mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-16 16:30:34 +08:00
Fix formatting
This commit is contained in:
committed by
Matthias Grob
parent
d3e9ee88a0
commit
0c2b9dc0b8
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user