diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-12-14 09:07:24 -0500 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-12-14 09:07:24 -0500 |
commit | ebb312e616b0f9594a8b10a4c5711c655564bc17 (patch) | |
tree | 61bb4e12225400532710baa844216a85b10f50b4 /device-functions.c | |
parent | e81d97b4bc79283f788307aad9c24888afb759a2 (diff) |
added couple_first_N_pw_ranges_to_ampl_ranges to support PG A+B+C (-M5)
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/device-functions.c b/device-functions.c index de21933..46b9083 100644 --- a/device-functions.c +++ b/device-functions.c @@ -2456,6 +2456,22 @@ int Set_VI_Control(int parameter,int channel,float new_ampl,int *point_found,int top_range_only=1; } + if (globals.Flash.couple_first_N_pw_ranges_to_ampl_ranges[channel]) { + int curr_pw_range = 0; + int parse_sr = globals.Registers.shift_reg_out[3] & 0x7f; + + while (parse_sr) { + ++curr_pw_range; + parse_sr = parse_sr >> 1; + } + + starting_range = curr_pw_range; + + if (starting_range > globals.Flash.couple_first_N_pw_ranges_to_ampl_ranges[channel]) { + starting_range = globals.Flash.couple_first_N_pw_ranges_to_ampl_ranges[channel]; + } + } + break; case pwl_os_values: decreasing_values_allowed=YES; /* allows Vc=0 to corresponds to most + OS, and Vc=10V to give most - OS */ |