From 90bd0f717dc9cbe727e19522b7d447a4ae43b1d5 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 7 Oct 2020 07:31:08 +0200 Subject: [PATCH] examples: fix battery examples This is due to the mavlink extension change. --- examples/battery/battery.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/battery/battery.cpp b/examples/battery/battery.cpp index 16d2fcf823..5c31caa63f 100644 --- a/examples/battery/battery.cpp +++ b/examples/battery/battery.cpp @@ -82,6 +82,8 @@ void send_battery_status(std::shared_ptr mavlink_passthrough UINT16_MAX, UINT16_MAX}; // mV + const uint16_t voltages_ext[4]{0, 0, 0, 0}; + mavlink_message_t message; mavlink_msg_battery_status_pack( mavlink_passthrough->get_our_sysid(), @@ -98,7 +100,9 @@ void send_battery_status(std::shared_ptr mavlink_passthrough 80, // battery_remaining % 3600, // time_remaining MAV_BATTERY_CHARGE_STATE_OK, - 0); // voltages_ext + voltages_ext, + MAV_BATTERY_MODE_UNKNOWN, // mode + 0); // fault_bitmask mavlink_passthrough->send_message(message); }