|
|
|
@ -267,7 +267,7 @@ bool GCS_MAVLINK::send_battery_status()
@@ -267,7 +267,7 @@ bool GCS_MAVLINK::send_battery_status()
|
|
|
|
|
|
|
|
|
|
for(uint8_t i = 0; i < AP_BATT_MONITOR_MAX_INSTANCES; i++) { |
|
|
|
|
const uint8_t battery_id = (last_battery_status_idx + 1) % AP_BATT_MONITOR_MAX_INSTANCES; |
|
|
|
|
if (battery.get_type(battery_id) != AP_BattMonitor_Params::BattMonitor_Type::BattMonitor_TYPE_NONE) { |
|
|
|
|
if (battery.get_type(battery_id) != AP_BattMonitor::Type::NONE) { |
|
|
|
|
CHECK_PAYLOAD_SIZE(BATTERY_STATUS); |
|
|
|
|
send_battery_status(battery_id); |
|
|
|
|
last_battery_status_idx = battery_id; |
|
|
|
|