From be21091619a8c33fead30e81e11ed45d52f5c845 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 25 May 2022 08:57:36 +1000 Subject: [PATCH] GCS_MAVLink: pass mavlink_command_ack_t to accelcal library The library needs to look at the content of the packet. Given that GCS_MAVLink is already within handle_command_ack, decoding it there makes sense. --- libraries/GCS_MAVLink/GCS_Common.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 9f831f73cf..a3082eff8b 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -3356,9 +3356,12 @@ void GCS_MAVLINK::handle_vision_speed_estimate(const mavlink_message_t &msg) void GCS_MAVLINK::handle_command_ack(const mavlink_message_t &msg) { #if HAL_INS_ACCELCAL_ENABLED + mavlink_command_ack_t packet; + mavlink_msg_command_ack_decode(&msg, &packet); + AP_AccelCal *accelcal = AP::ins().get_acal(); if (accelcal != nullptr) { - accelcal->handleMessage(msg); + accelcal->handle_command_ack(packet); } #endif }