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 /globals.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 'globals.c')
-rw-r--r-- | globals.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -26,6 +26,9 @@ GlobalStruct globals = { }; +PwlStruct pwl_struct[pwl_max_types][max_channels]; + + long sec_timer (void) { return (long)time(NULL); @@ -43,3 +46,18 @@ unsigned long long ms_timer (void) return millisecondsSinceEpoch; } + +const char* param_name[] = { "AMPL", "OS", "PW", "DELAY", "PERIOD", "BURST", "RISE", "SLEW", "DISTORT" }; + +void debug_new_parameter (int channel, int parameter, float requested) +{ + g_print_debug("chan %d, %s, requested %e, adjusted %e, polarity %d, range %d, word %d, aux %d, atten %d\n", + channel, param_name[parameter], requested, + pwl_struct[parameter][channel].actual_value, + pwl_struct[parameter][channel].actual_pol, + pwl_struct[parameter][channel].range, + pwl_struct[parameter][channel].word_out, + pwl_struct[parameter][channel].word_out_aux, + pwl_struct[parameter][channel].atten_range); +} + |