From a44ed03a917909f30adffa21c32a59db036fa968 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Tue, 30 Apr 2019 12:22:47 +0200 Subject: [PATCH] AP_AccelCal: pass mavlink_message_t by const reference --- libraries/AP_AccelCal/AP_AccelCal.cpp | 4 ++-- libraries/AP_AccelCal/AP_AccelCal.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_AccelCal/AP_AccelCal.cpp b/libraries/AP_AccelCal/AP_AccelCal.cpp index f74a67e430..fb4ff80df6 100644 --- a/libraries/AP_AccelCal/AP_AccelCal.cpp +++ b/libraries/AP_AccelCal/AP_AccelCal.cpp @@ -353,13 +353,13 @@ bool AP_AccelCal::client_active(uint8_t client_num) return (bool)_clients[client_num]->_acal_get_calibrator(0); } -void AP_AccelCal::handleMessage(const mavlink_message_t* msg) +void AP_AccelCal::handleMessage(const mavlink_message_t &msg) { if (!_waiting_for_mavlink_ack) { return; } _waiting_for_mavlink_ack = false; - if (msg->msgid == MAVLINK_MSG_ID_COMMAND_ACK) { + if (msg.msgid == MAVLINK_MSG_ID_COMMAND_ACK) { _start_collect_sample = true; } } diff --git a/libraries/AP_AccelCal/AP_AccelCal.h b/libraries/AP_AccelCal/AP_AccelCal.h index 2504e2a423..8914cc3725 100644 --- a/libraries/AP_AccelCal/AP_AccelCal.h +++ b/libraries/AP_AccelCal/AP_AccelCal.h @@ -33,7 +33,7 @@ public: // interface to the clients for registration static void register_client(AP_AccelCal_Client* client); - void handleMessage(const mavlink_message_t * msg); + void handleMessage(const mavlink_message_t &msg); private: GCS_MAVLINK *_gcs;