diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -157,7 +157,6 @@ int I2C_Check_Monitors(void) int monitor_word; float new_val, avg_val, step_size, max_dev_in_steps; int channel; - int ampl_range,point_found,UseNegData,entry,word_out,atten_range; int update_display; int use_neg_data; @@ -193,13 +192,9 @@ int I2C_Check_Monitors(void) monitor_word=I2C_Get_Monitor_Word(channel); - /* determine current ampl_range */ - Set_VI_Control(pwl_ampl_values,channel,globals.ChannelState[channel].amplitude,&point_found, - &l_range,&atten_range,&UseNegData,&entry,&word_out,&actual_pol,NULL); - /* 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][ampl_range][use_neg_data]; + / globals.Flash.mon_vi_ratio[channel][pwl_struct[pwl_ampl_values][channel].range][pwl_struct[pwl_ampl_values][channel].use_neg_data]; /* averaging */ for (i=CURR_MON_MAX_OLD_COUNTS-1;i>0;i--) { |