From 601766cc4bdf4c7185e198a3089dc41e4ecbc48a Mon Sep 17 00:00:00 2001 From: Mike Date: Sat, 1 Jan 2000 00:44:43 +0900 Subject: fix determination of when to use negative monitor configs --- monitor.c | 5 ++--- 1 file 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--) { -- cgit