summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/device-functions.c b/device-functions.c
index 333d9cb..d9f4664 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -252,7 +252,7 @@ static int attenuator_count (int channel)
int Set_Amplitude(int check_possible_only,int pol_override,int override_on,int word_override,int range_override,int aux_override,
- int switch_range_only,int channel,float new_ampl,int called_from_set_pw)
+ int switch_range_only,int channel,float requested_ampl,int called_from_set_pw)
{
int word_out, word_out_aux; /* what is sent to the DAC */
int relay_range,atten_range,old_range,old_actual_pol; /* selects relay range */
@@ -261,6 +261,10 @@ int Set_Amplitude(int check_possible_only,int pol_override,int override_on,int w
int entry;
int actual_pol;
+ float new_ampl;
+
+ new_ampl = requested_ampl;
+
if (!globals.Flash.voltage_enabled[channel] && !globals.Flash.current_enabled[channel]) {
return Unrecognized;
}
@@ -447,7 +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("chan %d, ampl %e, range %d, word %d\n", channel, new_ampl, relay_range, word_out);
+ 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);
globals.Changes.update_amp=YES;