summaryrefslogtreecommitdiff
path: root/error_utils.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2014-08-14 14:20:04 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2014-08-14 14:20:04 -0400
commit2bff39db07f23a1983ff099a94f1705917a1fd07 (patch)
tree654e7388bf9da7bd8d8d4fd8dbdafdfdff501166 /error_utils.c
parent754daf480b463ed836dd3139a3dae67b6f91b059 (diff)
remove AVRQ-3-B supportINSTRUMENT_6_0_4
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;