From ce312d03280a8eaca8f4810b93f148bf9bddcad1 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Tue, 23 Feb 2021 11:58:51 -0300 Subject: [PATCH] GCS_MAVLink: use get_battery_remaining_percentage() for BATTERY_STATUS --- libraries/GCS_MAVLink/GCS_Common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 549f45442b..ff85b4db18 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -233,7 +233,7 @@ void GCS_MAVLINK::send_battery_status(const uint8_t instance) const current, // current in centiampere consumed_mah, // total consumed current in milliampere.hour consumed_wh, // consumed energy in hJ (hecto-Joules) - battery.capacity_remaining_pct(instance), + get_battery_remaining_percentage(instance), 0, // time remaining, seconds (not provided) MAV_BATTERY_CHARGE_STATE_UNDEFINED); }