diff options
author | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 19:47:36 -0500 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 19:47:36 -0500 |
commit | 339904d9514793ef435b9ab487c283b07675463e (patch) | |
tree | d33911efe209e7d4137e7b2d1c19184ee4c9f971 | |
parent | f2b6b52099e6b29d9ca659357c3aa0d0fd116b82 (diff) |
take into account PW range shifting in voltage-control units
-rw-r--r-- | device-functions.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/device-functions.c b/device-functions.c index f91a73a..d770093 100644 --- a/device-functions.c +++ b/device-functions.c @@ -2464,6 +2464,15 @@ int Set_VI_Control(int parameter,int channel,float new_ampl,int *point_found,int ++curr_pw_range; parse_sr = parse_sr >> 1; } + + if (globals.Flash.volt_ctrl_pw[channel]) { + // ranges are shifted in these units + ++curr_pw_range; + // except for minimum range + if (globals.Registers.shift_reg_out[3] & (long)0x01000) { + curr_pw_range = 0; + } + } starting_range = curr_pw_range; if (starting_range > globals.Flash.couple_first_N_pw_ranges_to_ampl_ranges[channel]) { @@ -2757,6 +2766,7 @@ int Set_VI_Control(int parameter,int channel,float new_ampl,int *point_found,int } } +if (parameter==pwl_ampl_values) {printf ("selected %d\n",*relay_range);} if (*word_out<0) { *word_out=0; return HardwareError; |