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;