summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:45:05 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:45:05 +0900
commit53b85c1f086d1509b923cb0e517bc6318a199018 (patch)
treeb6f2b48ded9eee5477dfa1e7729d4b749ce3780e
parenta8d0193faeab4003b7b356df5125b80924c795d9 (diff)
better limits on freq/pw for large burst sep calibration
-rw-r--r--device-functions.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/device-functions.c b/device-functions.c
index c083f42..6630c19 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -2043,7 +2043,8 @@ int Set_Dly_Shr_Cal(int channel,int calibration_point_number,float cal_point)
int Set_Cal_Nom(int channel,int calibration_point_number,int parameter, float *nom_val)
{
int nominal_wordout,nominal_wordout_aux,polarity,range,entry,status,num_in_range,num_of_ranges;
- float nominal_val,other_setting,temp1,temp2;
+ float nominal_val,temp1,temp2;
+ float other_setting, other_setting_freq, other_setting_pw;
int reset_state;
int disable_errors;
int true_channel;
@@ -2214,16 +2215,23 @@ int Set_Cal_Nom(int channel,int calibration_point_number,int parameter, float *n
break;
case pwl_burst_values:
- other_setting=20.0*nominal_val;
- if (other_setting>10.0) {
- other_setting=10.0; /* reduce pulse width if required */
+ other_setting_freq = 1 / (20.0 * nominal_val);
+ other_setting_pw = nominal_val;
+
+ if (other_setting_freq < 0.1) {
+ other_setting_freq = 0.1;
}
- status=Set_frequency(0,0,0,channel,1.0/other_setting);
+
+ if (other_setting_pw > 0.1) {
+ other_setting_pw = 0.1;
+ }
+
+ status=Set_frequency(0,0,0,channel,other_setting_freq);
Main_update_shift_registers();
if (!status) {
- status=Set_Pw(0,0,0,globals.Flash.ChanKey_pw?channel:0,nominal_val,0);
+ status=Set_Pw(0,0,0,globals.Flash.ChanKey_pw?channel:0,other_setting_pw,0);
}
if (!status) {
status=Set_Burst_Count(channel,4,nominal_val);