mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 16:33:34 +08:00
changed isnan checks and cmake compiler condition for apple machines
This commit is contained in:
@@ -74,7 +74,7 @@ float LowPassFilter2p::apply(float sample)
|
||||
|
||||
// do the filtering
|
||||
float delay_element_0 = sample - _delay_element_1 * _a1 - _delay_element_2 * _a2;
|
||||
if (isnan(delay_element_0) || isinf(delay_element_0)) {
|
||||
if (!PX4_ISFINITE(delay_element_0)) {
|
||||
// don't allow bad values to propagate via the filter
|
||||
delay_element_0 = sample;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user