summaryrefslogtreecommitdiff
path: root/error_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'error_utils.c')
-rw-r--r--error_utils.c53
1 files changed, 12 insertions, 41 deletions
diff --git a/error_utils.c b/error_utils.c
index bd52ccc..a98c7af 100644
--- a/error_utils.c
+++ b/error_utils.c
@@ -41,7 +41,7 @@ void set_gpib_error_flags (int error_num)
case UnknownUnits:
case InvalidChannel:
case ThisShouldntHappen:
- case ampl_min_max_obsolete:
+ case obsolete_feature:
case zero_equiv_ampl_too_large:
GPIB_Set_Command_Error();
break;
@@ -539,8 +539,8 @@ void get_error_text(gchar **response, int error_num)
format_error_text(response,-300,"Not ready for commands yet. Still booting up.");
break;
- case ampl_min_max_obsolete:
- format_error_text(response,-200,"Ampl min/max mode is obsolete. Use fixed ampl points instead.");
+ case obsolete_feature:
+ format_error_text(response,-200,"Obsolete feature enabled. Re-program.");
break;
case zero_equiv_ampl_too_large:
@@ -659,15 +659,12 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
if (!globals.Flash.ChanKey_current_limit) for (i=1; i<num_of_chan; ++i) {
ChannelStateToTest[i].soft_current_limit=ChannelStateToTest[0].soft_current_limit;
}
- for (i=1; i<num_of_chan; ++i) {
- ChannelStateToTest[i].vcc1=ChannelStateToTest[0].vcc1;
- }
- for (i=1; i<num_of_chan; ++i) {
- ChannelStateToTest[i].vcc2=ChannelStateToTest[0].vcc2;
- }
- for (i=1; i<num_of_chan; ++i) {
- ChannelStateToTest[i].vlogic=ChannelStateToTest[0].vlogic;
- }
+ }
+
+
+ // check for non-channel-specific obsolete features
+ if ( globals.Flash.enable_avrq_extra_ampls ) {
+ report_error = obsolete_feature;
}
@@ -701,9 +698,9 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
}
- // check for obsolete configurations - but allow further checks
- if (globals.Flash.ampl_min_max_only[i]) {
- report_error = ampl_min_max_obsolete;
+ // check for channel-specific obsolete configurations - but allow further checks
+ if ( globals.Flash.ampl_min_max_only[i] ) {
+ report_error = obsolete_feature;
}
if (fabs(globals.Flash.ampl_zero_equiv[i] > 200.0)) {
@@ -1069,32 +1066,6 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
/* disable amplitude checks if amplitude calibration is in progress */
if (!globals.Flags.extended_ampl_min_max) {
- globals.Constraints.err_max_vcc1[i]=globals.Flash.vcc1_max[i];
- globals.Constraints.err_max_vcc2[i]=globals.Flash.vcc2_max[i];
- globals.Constraints.err_max_vlogic[i]=ChannelStateToTest[0].vcc1;
- globals.Constraints.err_min_vcc1[i]=0.0;
- globals.Constraints.err_min_vcc2[i]=globals.Flash.vcc2_min[i];
- globals.Constraints.err_min_vlogic[i]=0.0;
- if ( ChannelStateToTest[i].vcc1>(1.001*globals.Constraints.err_max_vcc1[i])) {
- report_error=amplitude_upper_limit;
- }
- if ( ChannelStateToTest[i].vcc2>(1.001*globals.Constraints.err_max_vcc2[i])) {
- report_error=amplitude_upper_limit;
- }
- if ( ChannelStateToTest[i].vlogic>(1.001*globals.Constraints.err_max_vlogic[i])) {
- report_error=amplitude_upper_limit;
- }
- if ( ChannelStateToTest[i].vcc1<globals.Constraints.err_min_vcc1[i]) {
- report_error=amplitude_lower_limit;
- }
- if ( ChannelStateToTest[i].vcc2<globals.Constraints.err_min_vcc2[i]) {
- report_error=amplitude_lower_limit;
- }
- if ( ChannelStateToTest[i].vlogic<globals.Constraints.err_min_vlogic[i]) {
- report_error=amplitude_lower_limit;
- }
-
-
/* --- check fixed amplitudes ---- */
float min_fixed_ampl, max_fixed_ampl;