summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:04:21 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:04:21 +0900
commit7803d5ba6c602cf3a50c0b62cbebfe3b54e21f13 (patch)
treeac8af368cd3b7906603627c3f809f82e0572e437 /device-functions.c
parent75b3c18090031d73c1dd6d031ee6b752497c239e (diff)
debug messages showing XTR line changesINSTRUMENT_6_4_23c
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/device-functions.c b/device-functions.c
index ed57c96..76db714 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -451,8 +451,8 @@ int Set_Amplitude(int check_possible_only,int pol_override,int override_on,int w
globals.Flags.force_output_fully_off=YES;
}
- g_print_debug("%ld - chan %d, requested ampl %e, set ampl %e, polarity %d, range %d, word %d\n",
- sec_timer(), channel, requested_ampl, new_ampl, actual_pol, relay_range, word_out);
+ g_print_debug("chan %d, requested ampl %e, set ampl %e, polarity %d, range %d, word %d\n",
+ channel, requested_ampl, new_ampl, actual_pol, relay_range, word_out);
globals.Changes.update_amp=YES;
@@ -4914,6 +4914,21 @@ static void set_shiftreg_bits(int shiftreg, int start_at_bit, int numbits, int v
long masked_reg = globals.Registers.shift_reg_out[shiftreg] & mask;
g_print_debug(": shiftreg %d, mask %x, start_at_bit %d, numbits %d, value %x\n", shiftreg, mask, start_at_bit, numbits, value);
+
+ if (shiftreg == SR_2) {
+ int i;
+ for (i=1;i<=5;i++) {
+ int pos = XTR_POS + i;
+ if ((pos >= start_at_bit) && (pos < (start_at_bit + numbits))) {
+ if ((1 << pos) & shift_value) {
+ g_print_debug(": XTR%d set HIGH\n", i);
+ } else {
+ g_print_debug(": XTR%d set LOW\n", i);
+ }
+ }
+ }
+ }
+
globals.Registers.shift_reg_out[shiftreg] = masked_reg | shift_value;
}