summaryrefslogtreecommitdiff
path: root/error_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'error_utils.c')
-rw-r--r--error_utils.c9
1 files changed, 9 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];