From bb884d8ad866d3bb2e18012fcb84f09ef8dd52a8 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Tue, 14 Aug 2018 13:16:44 -0400 Subject: only check pw_rc limit if greater than zero --- error_utils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'error_utils.c') 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]), -- cgit