summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 01:28:12 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 01:28:12 +0900
commitd461f7e68e63ce84b48bc63759596d7ab39c6278 (patch)
treebd2217c3c224b07f5e7531d74cd94a16c88636eb /device-functions.c
parent4d96d6bbd773583e3f3713b3afb273194213ce47 (diff)
more specific errors during cal min/max check, and more initial cal points
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c61
1 files changed, 28 insertions, 33 deletions
diff --git a/device-functions.c b/device-functions.c
index 0551cbf..c185e6b 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -333,7 +333,7 @@ int Set_Amplitude(int check_possible_only,int pol_override,int override_on,int w
if (point_found) {
return OK;
} else {
- return CalibrationMinMaxError;
+ return CalibrationMinMaxError_ampl;
}
}
@@ -519,7 +519,7 @@ int Set_Pw(int check_possible_only,int word_override,int range_override,int chan
if (point_found) {
return OK;
} else {
- return CalibrationMinMaxError;
+ return CalibrationMinMaxError_pw;
}
}
@@ -690,7 +690,7 @@ int Set_Offset(int check_possible_only,int override_on,int word_override,int ran
if (point_found) {
return OK;
} else {
- return CalibrationMinMaxError;
+ return CalibrationMinMaxError_os;
}
}
@@ -777,7 +777,7 @@ int Set_frequency(int check_possible_only,int word_override,int range_override,i
if (point_found) {
return OK;
} else {
- return CalibrationMinMaxError;
+ return CalibrationMinMaxError_freq;
}
}
@@ -874,7 +874,7 @@ int Set_Delay(int check_possible_only,int word_override,int range_override,int c
}
setting = set_delay;
-
+
if (!globals.Flash.volt_ctrl_delay[channel]) {
/* tweak depending on polarity */
adj_setting = set_delay;
@@ -916,7 +916,7 @@ int Set_Delay(int check_possible_only,int word_override,int range_override,int c
if (point_found) {
return OK;
} else {
- return CalibrationMinMaxError;
+ return CalibrationMinMaxError_delay;
}
}
@@ -3419,55 +3419,50 @@ int Check_MinMax_Cal(int channel,int parameter)
/* see if new point prevents zero, min, max, or current value from being obtained */
switch (parameter) {
case (pwl_ampl_values):
- status=Set_Amplitude(1,0,0,0,0,0,channel,globals.Flash.min_ampl[channel],0)
- || Set_Amplitude(1,0,0,0,0,0,channel,globals.Flash.max_ampl[channel],0)
- || Set_Amplitude(1,0,0,0,0,0,channel,rst_ampl_value(channel),0);
+ if (status=Set_Amplitude(1,0,0,0,0,0,channel,globals.Flash.min_ampl[channel],0)) return status;
+ if (status=Set_Amplitude(1,0,0,0,0,0,channel,globals.Flash.max_ampl[channel],0)) return status;
+ if (status=Set_Amplitude(1,0,0,0,0,0,channel,rst_ampl_value(channel),0)) return status;
break;
case (pwl_os_values):
- status=Set_Offset(1,0,0,0,channel,globals.Flash.min_offset[channel])
- || Set_Offset(1,0,0,0,channel,globals.Flash.max_offset[channel])
- || Set_Offset(1,0,0,0,channel,0.0);
+ if (status=Set_Offset(1,0,0,0,channel,globals.Flash.min_offset[channel])) return status;
+ if (status=Set_Offset(1,0,0,0,channel,globals.Flash.max_offset[channel])) return status;
+ if (status=Set_Offset(1,0,0,0,channel,0.0)) return status;
break;
case pwl_pw_values:
- status=Set_Pw(1,0,0,channel,globals.Flash.min_pw[channel],0)
- || Set_Pw(1,0,0,channel,globals.Flash.max_pw[channel],0);
+ if (status=Set_Pw(1,0,0,channel,globals.Flash.min_pw[channel],0)) return status;
+ if (status=Set_Pw(1,0,0,channel,globals.Flash.max_pw[channel],0)) return status;
break;
case pwl_delay_values:
- status=Set_Delay(1,0,0,channel,globals.Flash.min_delay[channel])
- || Set_Delay(1,0,0,channel,globals.Flash.max_delay[channel]);
+ if (status=Set_Delay(1,0,0,channel,globals.Flash.min_delay[channel])) return status;
+ if (status=Set_Delay(1,0,0,channel,globals.Flash.max_delay[channel])) return status;
break;
case pwl_period_values:
- status=Set_frequency(1,0,0,channel,globals.Flash.min_freq[channel])
- || Set_frequency(1,0,0,channel,globals.Flash.max_freq[channel]);
+ if (status=Set_frequency(1,0,0,channel,globals.Flash.min_freq[channel])) return status;
+ if (status=Set_frequency(1,0,0,channel,globals.Flash.max_freq[channel])) return status;
break;
case pwl_burst_values:
- status=Set_Burst_Time(1,0,0,channel,globals.Flash.min_burst_gap[channel])
- || Set_Burst_Time(1,0,0,channel,globals.Flash.max_burst_gap[channel]);
+ if (status=Set_Burst_Time(1,0,0,channel,globals.Flash.min_burst_gap[channel])) return status;
+ if (status=Set_Burst_Time(1,0,0,channel,globals.Flash.max_burst_gap[channel])) return status;
break;
case pwl_rise_time_values:
- status=Set_rise_time(1,0,0,channel,globals.Flash.min_rise_time[channel])
- || Set_rise_time(1,0,0,channel,globals.Flash.max_rise_time[channel]);
+ if (status=Set_rise_time(1,0,0,channel,globals.Flash.min_rise_time[channel])) return status;
+ if (status=Set_rise_time(1,0,0,channel,globals.Flash.max_rise_time[channel])) return status;
break;
case pwl_slew_values:
- status=Set_slew(1,0,0,channel,globals.Flash.min_slew[channel])
- || Set_slew(1,0,0,channel,globals.Flash.max_slew[channel]);
+ if (status=Set_slew(1,0,0,channel,globals.Flash.min_slew[channel])) return status;
+ if (status=Set_slew(1,0,0,channel,globals.Flash.max_slew[channel])) return status;
break;
}
- if (status) {
- /* change the error code to a calibration-related one */
- status=CalibrationMinMaxError;
- }
-
- return status;
+ return OK;
}
@@ -3598,7 +3593,7 @@ int Set_Burst_Time(int check_possible_only,int word_override,int range_override,
if (point_found) {
return OK;
} else {
- return CalibrationMinMaxError;
+ return CalibrationMinMaxError_burst;
}
}
@@ -3705,7 +3700,7 @@ int Set_rise_time(int check_possible_only,int word_override,int range_override,i
if (point_found) {
return OK;
} else {
- return CalibrationMinMaxError;
+ return CalibrationMinMaxError_rise;
}
}
@@ -3881,7 +3876,7 @@ int Set_slew(int check_possible_only,int word_override,int range_override,int ch
if (point_found) {
return OK;
} else {
- return CalibrationMinMaxError;
+ return CalibrationMinMaxError_slew;
}
}