mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 14:08:52 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user