diff options
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 19 |
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; } |