diff options
author | Mike <mjc@avtechpulse.com> | 2000-01-01 00:44:43 +0900 |
---|---|---|
committer | Mike <mjc@avtechpulse.com> | 2000-01-01 00:44:43 +0900 |
commit | 601766cc4bdf4c7185e198a3089dc41e4ecbc48a (patch) | |
tree | 52fa2cadc1c3c0ed73aadcec9af96a038b9c13a4 | |
parent | ba8cf68a370c6f88a318ada1373e896bb2081ce7 (diff) |
fix determination of when to use negative monitor configs
-rw-r--r-- | monitor.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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--) { |