changed isnan checks and cmake compiler condition for apple machines

This commit is contained in:
Andreas Antener
2015-12-03 15:39:41 +01:00
parent c4ed598dff
commit 08a1797eec
4 changed files with 5 additions and 5 deletions
@@ -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;
}