Browse Source

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.
apm_2208
Peter Barker 3 years ago committed by Andrew Tridgell
parent
commit
be21091619
  1. 5
      libraries/GCS_MAVLink/GCS_Common.cpp

5
libraries/GCS_MAVLink/GCS_Common.cpp

@ -3356,9 +3356,12 @@ void GCS_MAVLINK::handle_vision_speed_estimate(const mavlink_message_t &msg) @@ -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
}

Loading…
Cancel
Save