diff options
author | Mike <mjc@avtechpulse.com> | 2000-01-01 01:25:54 +0900 |
---|---|---|
committer | Mike <mjc@avtechpulse.com> | 2000-01-01 01:25:54 +0900 |
commit | 845fc78831dedcf1f0c529c1302cb04fead7acb6 (patch) | |
tree | c52013a0edb5e0442cc302e7a184cf56cc22ef2c /monitor.c | |
parent | fb8121e28a0becdabebc0c87a268c0b2f72d4e02 (diff) |
Major reworking. Set_VI_Control now stores its calculation results for later reference.INSTRUMENT_6_4_23d
This fixes the problem of adding cal points to parameters with large adjustments.
The x values are now correct, but the user must still manually compensate for y changes.
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--) { |