Fix formatting

This commit is contained in:
nanthony21
2018-03-11 00:15:50 -06:00
committed by Matthias Grob
parent d3e9ee88a0
commit 0c2b9dc0b8
+3 -2
View File
@@ -127,14 +127,15 @@ Battery::filterCurrent(float current_a)
}
}
void Battery::filterThrottle(float throttle){
void Battery::filterThrottle(float throttle)
{
if (!_battery_initialized) {
_throttle_filtered = throttle;
}
const float filtered_next = _throttle_filtered * 0.99f + throttle * 0.01f;
if (PX4_ISFINITE(filtered_next)){
if (PX4_ISFINITE(filtered_next)) {
_throttle_filtered = filtered_next;
}
}