summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/monitor.c b/monitor.c
index 7321af6..1db7ff4 100644
--- a/monitor.c
+++ b/monitor.c
@@ -160,7 +160,6 @@ int I2C_Check_Monitors(void)
int update_display;
int use_neg_data;
- int actual_pol;
int i;
int error_num;
long timer_check;
@@ -184,7 +183,7 @@ int I2C_Check_Monitors(void)
monitor_last_forced_trig[channel]=timer_check;
}
- if (globals.Flash.sep_posneg_mon_ratio[channel] && globals.ChannelState[channel].amplitude<0.0) {
+ if (globals.Flash.sep_posneg_mon_ratio[channel] && pwl_struct[pwl_ampl_values][channel].use_neg_data) {
use_neg_data=1;
} else {
use_neg_data=0;
@@ -194,7 +193,7 @@ int I2C_Check_Monitors(void)
/* 5.0V is the full-scale voltage of the 12bit ADC */
new_val = ((((float) monitor_word)/4095.0) * 5.0)
- / globals.Flash.mon_vi_ratio[channel][pwl_struct[pwl_ampl_values][channel].range][pwl_struct[pwl_ampl_values][channel].use_neg_data];
+ / globals.Flash.mon_vi_ratio[channel][pwl_struct[pwl_ampl_values][channel].range][use_neg_data];
/* averaging */
for (i=CURR_MON_MAX_OLD_COUNTS-1;i>0;i--) {