From 0c2b9dc0b80b6b1d20798d9642d0efffd34290b1 Mon Sep 17 00:00:00 2001 From: nanthony21 Date: Sun, 11 Mar 2018 00:15:50 -0600 Subject: [PATCH] Fix formatting --- src/modules/systemlib/battery.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/systemlib/battery.cpp b/src/modules/systemlib/battery.cpp index 2302515707..04a711837c 100644 --- a/src/modules/systemlib/battery.cpp +++ b/src/modules/systemlib/battery.cpp @@ -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; } }