From cf264a7d5e6ab1bbe1778a1ba761f2609cd35bd9 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 1 Mar 2019 22:50:05 +1100 Subject: [PATCH] GCS_MAVLink: move vehicle_initialised to be on GCS not GCS_MAVLink --- libraries/GCS_MAVLink/GCS.h | 3 +-- libraries/GCS_MAVLink/GCS_Common.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libraries/GCS_MAVLink/GCS.h b/libraries/GCS_MAVLink/GCS.h index 80d6116a1c..47d9db035d 100644 --- a/libraries/GCS_MAVLink/GCS.h +++ b/libraries/GCS_MAVLink/GCS.h @@ -437,8 +437,6 @@ protected: void send_hwstatus(); void handle_data_packet(mavlink_message_t *msg); - virtual bool vehicle_initialised() const { return true; } - // these two methods are called after current_loc is updated: virtual int32_t global_position_int_alt() const; virtual int32_t global_position_int_relative_alt() const; @@ -776,6 +774,7 @@ public: void update_passthru(); void get_sensor_status_flags(uint32_t &present, uint32_t &enabled, uint32_t &health); + virtual bool vehicle_initialised() const { return true; } protected: diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 6c8487e31e..fd32efd42f 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -198,7 +198,7 @@ void GCS_MAVLINK::send_meminfo(void) // report power supply status void GCS_MAVLINK::send_power_status(void) { - if (!vehicle_initialised()) { + if (!gcs().vehicle_initialised()) { // avoid unnecessary errors being reported to user return; } @@ -3846,7 +3846,7 @@ void GCS_MAVLINK::send_sys_status() { // send extended status only once vehicle has been initialised // to avoid unnecessary errors being reported to user - if (!vehicle_initialised()) { + if (!gcs().vehicle_initialised()) { return; }