mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-07 00:13:59 -04:00
AP_Math: improve gating of use of AP_InternalError library
- gate calls into library directly on the define - INTERNAL_ERROR becomes empty if library not compiled in
This commit is contained in:
parent
94e61a263d
commit
8df2d4998b
@ -270,7 +270,7 @@ T constrain_value_line(const T amt, const T low, const T high, uint32_t line)
|
|||||||
// errors through any function that uses constrain_value(). The normal
|
// errors through any function that uses constrain_value(). The normal
|
||||||
// float semantics already handle -Inf and +Inf
|
// float semantics already handle -Inf and +Inf
|
||||||
if (isnan(amt)) {
|
if (isnan(amt)) {
|
||||||
#if !defined(IOMCU_FW)
|
#if AP_INTERNALERROR_ENABLED
|
||||||
AP::internalerror().error(AP_InternalError::error_t::constraining_nan, line);
|
AP::internalerror().error(AP_InternalError::error_t::constraining_nan, line);
|
||||||
#endif
|
#endif
|
||||||
return (low + high) / 2;
|
return (low + high) / 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user