From e9845fd59329d34903c75c651261520330a8adfc Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 8 Jul 2017 14:46:48 +1000 Subject: [PATCH] Sub: eliminate global static GCS_MAVLINK::send_home_all --- ArduSub/GCS_Sub.h | 3 +++ ArduSub/commands.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ArduSub/GCS_Sub.h b/ArduSub/GCS_Sub.h index f2f97c6b4f..edc1dccf7a 100644 --- a/ArduSub/GCS_Sub.h +++ b/ArduSub/GCS_Sub.h @@ -16,6 +16,9 @@ public: GCS_MAVLINK_Sub &chan(const uint8_t ofs) override { return _chan[ofs]; }; + const GCS_MAVLINK_Sub &chan(const uint8_t ofs) const override { + return _chan[ofs]; + }; private: diff --git a/ArduSub/commands.cpp b/ArduSub/commands.cpp index e6ba8346d6..31a0129996 100644 --- a/ArduSub/commands.cpp +++ b/ArduSub/commands.cpp @@ -91,7 +91,7 @@ bool Sub::set_home(const Location& loc, bool lock) Log_Write_Home_And_Origin(); // send new home location to GCS - GCS_MAVLINK::send_home_all(loc); + gcs().send_home(loc); // return success return true;