summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1970-01-01 09:17:06 +0900
committerroot <root@avtech.domain.avtechpulse.com>1970-01-01 09:17:06 +0900
commit96c6ea4382b2ec2bd665a2faa1971e18018a275f (patch)
tree10f3e6b49aa5a9cd761f878c55eff16031eebfa7
parenta1a298c37ad0a762b651ad349d86ad32eb902904 (diff)
throw error if obsolete ampl min/max-only mode is enabled
-rw-r--r--error_utils.c11
-rw-r--r--globals.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/error_utils.c b/error_utils.c
index 603d072..50bc75d 100644
--- a/error_utils.c
+++ b/error_utils.c
@@ -41,6 +41,7 @@ void set_gpib_error_flags (int error_num)
case UnknownUnits:
case InvalidChannel:
case ThisShouldntHappen:
+ case ampl_min_max_obsolete:
GPIB_Set_Command_Error();
break;
case query_error_interrupted:
@@ -537,6 +538,10 @@ 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.");
+ break;
+
default:
format_error_text(response,-200,"Specific problem unknown.");
}
@@ -690,6 +695,12 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
break;
}
+
+ // check for obsolete configurations - but allow further checks
+ if (globals.Flash.ampl_min_max_only[i]) {
+ report_error = ampl_min_max_obsolete;
+ }
+
/* calculate maximum duty cycle based on amplitude and load, for later use */
max_duty_high_ampl=globals.Flash.max_duty_high[i];
diff --git a/globals.h b/globals.h
index ec25b09..9f45e9b 100644
--- a/globals.h
+++ b/globals.h
@@ -91,6 +91,8 @@
#define DelayRangeError 77
#define ExternalModeDelayError 78
#define PRF_limited_by_offset 79
+#define ampl_min_max_obsolete 80
+
#define YES 1
#define NO 0