battery_status: report remaining flight time in seconds

This allows more accurate reporting and is compliant with the
MAVLink interface.
This commit is contained in:
Matthias Grob
2021-11-15 15:44:02 +01:00
parent 4ba84d56c9
commit 54f2e91775
7 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ void Batmon::RunImpl()
// Read run time to empty (minutes).
ret |= _interface->read_word(BATT_SMBUS_RUN_TIME_TO_EMPTY, result);
new_report.run_time_to_empty = result;
new_report.time_remaining_s = result * 60;
// Read average time to empty (minutes).
ret |= _interface->read_word(BATT_SMBUS_AVERAGE_TIME_TO_EMPTY, result);