summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c12
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 {