diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2018-08-14 13:16:44 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2018-08-14 13:16:44 -0400 |
commit | bb884d8ad866d3bb2e18012fcb84f09ef8dd52a8 (patch) | |
tree | 723d78886142c1680a9b512b9b031fd004ca0d19 | |
parent | d80c5cbf802782ab4f38b4d237649f1cda8c1199 (diff) |
only check pw_rc limit if greater than zeroINSTRUMENT_6_4_05b
-rw-r--r-- | error_utils.c | 6 |
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]), |