battery_status: clearly define and handle zero remaining flight time

This commit is contained in:
Matthias Grob
2021-11-15 15:44:02 +01:00
parent 73287e8e8c
commit 91c48606ee
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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) {