Skip to content

Commit

Permalink
Rover: move handling of DO_SET_HOME up to GCS_MAVLink base class
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Apr 3, 2024
1 parent 1ffcb59 commit 260bd9e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
8 changes: 0 additions & 8 deletions Rover/GCS_Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,14 +656,6 @@ MAV_RESULT GCS_MAVLINK_Rover::_handle_command_preflight_calibration(const mavlin
return GCS_MAVLINK::_handle_command_preflight_calibration(packet, msg);
}

bool GCS_MAVLINK_Rover::set_home_to_current_location(bool _lock) {
return rover.set_home_to_current_location(_lock);
}

bool GCS_MAVLINK_Rover::set_home(const Location& loc, bool _lock) {
return rover.set_home(loc, _lock);
}

MAV_RESULT GCS_MAVLINK_Rover::handle_command_int_packet(const mavlink_command_int_t &packet, const mavlink_message_t &msg)
{
switch (packet.command) {
Expand Down
2 changes: 0 additions & 2 deletions Rover/GCS_Mavlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class GCS_MAVLINK_Rover : public GCS_MAVLINK

bool persist_streamrates() const override { return true; }

bool set_home_to_current_location(bool lock) override;
bool set_home(const Location& loc, bool lock) override;
uint64_t capabilities() const override;

void send_nav_controller_output() const override;
Expand Down
4 changes: 2 additions & 2 deletions Rover/Rover.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ class Rover : public AP_Vehicle {
bool is_balancebot() const;

// commands.cpp
bool set_home_to_current_location(bool lock) WARN_IF_UNUSED;
bool set_home(const Location& loc, bool lock) WARN_IF_UNUSED;
bool set_home_to_current_location(bool lock) override WARN_IF_UNUSED;
bool set_home(const Location& loc, bool lock) override WARN_IF_UNUSED;
void update_home();

// crash_check.cpp
Expand Down

0 comments on commit 260bd9e

Please sign in to comment.