summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--error_utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/error_utils.c b/error_utils.c
index 1fa3b3a..7cead90 100644
--- a/error_utils.c
+++ b/error_utils.c
@@ -937,8 +937,10 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
}
// RC limit, as per AVR-8F-B
- check_another_max_value (globals.Flash.cap_for_pw_rc_limit[i] * ChannelStateToTest[i].load_type,
- &globals.Constraints.err_max_pw[i], ChannelStateToTest[i].pw, pw_rc_limit, &report_error);
+ if (globals.Flash.cap_for_pw_rc_limit[i] > 0.0) {
+ check_another_max_value (globals.Flash.cap_for_pw_rc_limit[i] * ChannelStateToTest[i].load_type,
+ &globals.Constraints.err_max_pw[i], ChannelStateToTest[i].pw, pw_rc_limit, &report_error);
+ }
if (ChannelStateToTest[i].double_pulse==double_on) {
check_another_max_value ((ChannelStateToTest[i].delay - globals.Flash.double_pulse_extra_deadtime[i]) / (1.0 + globals.Flash.double_pulse_extra_pw_margin[i]),