mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 06:33:33 +08:00
battery_status: clearly define and handle zero remaining flight time
This commit is contained in:
@@ -249,7 +249,7 @@ void Battery::computeScale()
|
||||
|
||||
float Battery::computeRemainingTime(float current_a)
|
||||
{
|
||||
float time_remaining_s = -1.f;
|
||||
float time_remaining_s{NAN};
|
||||
|
||||
// Only estimate remaining time with useful in flight current measurements
|
||||
if (_current_filter_a.getState() > 1.f) {
|
||||
|
||||
Reference in New Issue
Block a user