summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1970-01-01 09:24:53 +0900
committerroot <root@avtech.domain.avtechpulse.com>1970-01-01 09:24:53 +0900
commita95b1e0197bcd35c6a45a4c18f5a5fbe7cd4365c (patch)
treefefd9547dd2529dad17054050e5c754dbc80b294
parent96c6ea4382b2ec2bd665a2faa1971e18018a275f (diff)
throw error if old-AVRQ-style high zero equiv ampl is set. obsolete.
-rw-r--r--error_utils.c9
-rw-r--r--globals.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/error_utils.c b/error_utils.c
index 50bc75d..d339bdf 100644
--- a/error_utils.c
+++ b/error_utils.c
@@ -42,6 +42,7 @@ void set_gpib_error_flags (int error_num)
case InvalidChannel:
case ThisShouldntHappen:
case ampl_min_max_obsolete:
+ case zero_equiv_ampl_too_large:
GPIB_Set_Command_Error();
break;
case query_error_interrupted:
@@ -542,6 +543,10 @@ void get_error_text(gchar **response, int error_num)
format_error_text(response,-200,"Ampl min/max mode is obsolete. Use fixed ampl points instead.");
break;
+ case zero_equiv_ampl_too_large:
+ format_error_text(response,-200,"Ampl zero equivalent is too high. Reprogram it.");
+ break;
+
default:
format_error_text(response,-200,"Specific problem unknown.");
}
@@ -701,6 +706,10 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
report_error = ampl_min_max_obsolete;
}
+ if (fabs(globals.Flash.ampl_zero_equiv[i] > 200.0)) {
+ report_error = zero_equiv_ampl_too_large;
+ }
+
/* 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 9f45e9b..a39fe3b 100644
--- a/globals.h
+++ b/globals.h
@@ -92,6 +92,7 @@
#define ExternalModeDelayError 78
#define PRF_limited_by_offset 79
#define ampl_min_max_obsolete 80
+#define zero_equiv_ampl_too_large 81
#define YES 1