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.
This commit is contained in:
Peter Barker 2022-05-25 08:57:36 +10:00 committed by Andrew Tridgell
parent dcc1818ee2
commit be21091619

View File

@ -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
}