summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device-functions.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/device-functions.c b/device-functions.c
index a158f33..36ff8a4 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -634,6 +634,8 @@ int Set_frequency(int check_possible_only,int word_override,int range_override,i
globals.Changes.update_freq=YES;
}
+ g_print_debug("freq range %d, word %d\n",relay_range,word_out);
+
globals.ChannelState[channel].frequency=set_freq;
Set_Pw(0,0,0,channel,new_pw,0);
@@ -2663,23 +2665,17 @@ int Set_VI_Control(int parameter,int channel,float new_ampl,int *point_found,int
tweaked_use_ampl = use_ampl;
for (range_i=starting_range; (range_i<max_ranges) && (!*point_found || top_range_only); ++range_i) { /* use non-all-zero ranges */
- g_print_debug("range_i %d\r\n",range_i);
/* apply pw ampl/pol tweaks */
if (parameter == pwl_pw_values) {
tweaked_use_ampl = use_ampl + globals.Flash.pw_range_pol_tweaks[channel][range_i][pw_polarity];
}
for (entry_i=0; (entry_i<max_points-1) && (!*point_found || top_range_only); ++entry_i) {
- g_print_debug("entry_i %d\r\n",entry_i);
-
index=true_channel*max_ranges*max_polarity*max_points
+(range_i)*max_polarity*max_points
+(*UseNegData)*max_points
+(entry_i);
- g_print_debug("values %e - %e, %d - %d\r\n", pwl_amp[index], pwl_amp[index+1], pwl_vc[index], pwl_vc[index+1] );
-
-
if ( (fabs(pwl_amp[index]-pwl_amp[index+1])>smallest_allowed_number)
&&
( ((tweaked_use_ampl>=pwl_amp[index]) && (tweaked_use_ampl<=pwl_amp[index+1]))
@@ -2740,8 +2736,6 @@ int Set_VI_Control(int parameter,int channel,float new_ampl,int *point_found,int
}
}
- g_print_debug("word_out %d\r\n", *word_out);
-
/* The amplitude/os settings must lie within the calibration points. */
/* However, the timing data is allowed to lie outside the upper end, */
/* because the reciprocal relationship allows an asymptotic extension to infinity, */