diff options
author | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 19:24:35 -0500 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 19:24:35 -0500 |
commit | ca3514ba254ef3d51b40f9e9b7c0afb9c8980261 (patch) | |
tree | 47baddcd8f1793ac0a76d40004cff979a6c01754 | |
parent | 5e5d1b450bd584c84b85b8c204a09fa899416ec3 (diff) |
use XTR_RLY1, not 5, to drive attenuator - in future, use I2C
-rw-r--r-- | device-functions.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/device-functions.c b/device-functions.c index 2376e5a..fc87bda 100644 --- a/device-functions.c +++ b/device-functions.c @@ -324,13 +324,13 @@ int Set_Amplitude(int check_possible_only,int pol_override,int override_on,int w // deal with attenuator range - haven't done for CH2 yet // only implement one attenuator so far (range 0), out of possible max_attens (8!) + // use I2C driver in future? if (atten_range == 0) { - set_shiftreg_bits(SR_2, XTR_POS + 5, ONE_BIT, BIT_HIGH); + set_shiftreg_bits(SR_2, XTR_POS + 1, ONE_BIT, BIT_HIGH); } else { - set_shiftreg_bits(SR_2, XTR_POS + 5, ONE_BIT, BIT_LOW); - } + set_shiftreg_bits(SR_2, XTR_POS + 1, ONE_BIT, BIT_LOW); + } } -printf ("\nAMPL %f, range %d, word %d, atten %d\n\n", new_ampl, relay_range, word_out, atten_range); } else { @@ -2705,9 +2705,9 @@ int Set_VI_Control(int parameter,int channel,float new_ampl,int *point_found,int // no valid attenuators use_atten = 1.0; } else { - + if (parameter != pwl_ampl_values) { - continue; + continue; } else if (globals.Flash.attenuators[channel][*atten_range] == 0.0) { continue; } else { |