From 5646cfbd57e3d98c4c5aee3b638223238c6a4ac9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 7 Mar 2024 12:33:48 +1100 Subject: [PATCH] SITL: fixed the vehicle type of the simulated ship this was broken by https://github.com/ArduPilot/ardupilot/pull/23763 we need to look for other places where we have assumed the MAVLink field orderin in recent changes --- libraries/SITL/SIM_Ship.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libraries/SITL/SIM_Ship.cpp b/libraries/SITL/SIM_Ship.cpp index 0470be311e..6212105ce6 100644 --- a/libraries/SITL/SIM_Ship.cpp +++ b/libraries/SITL/SIM_Ship.cpp @@ -183,12 +183,11 @@ void ShipSim::send_report(void) if (now - last_heartbeat_ms >= 1000) { last_heartbeat_ms = now; + const mavlink_heartbeat_t heartbeat{ - MAV_TYPE_SURFACE_BOAT, - MAV_AUTOPILOT_INVALID, - 0, - 0, - 0}; + type : MAV_TYPE_SURFACE_BOAT, + autopilot : MAV_AUTOPILOT_INVALID}; + mavlink_message_t msg; mavlink_msg_heartbeat_encode_status( sys_id.get(),