Skip to content

Commit

Permalink
GCS_MAVLink: use AP_ServoRelayEvents singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and rmackay9 committed Apr 18, 2018
1 parent 544ac03 commit 682679c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion libraries/GCS_MAVLink/GCS.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ class GCS_MAVLINK
virtual AP_Rally *get_rally() const = 0;
virtual Compass *get_compass() const = 0;
virtual class AP_Camera *get_camera() const = 0;
virtual AP_ServoRelayEvents *get_servorelayevents() const = 0;
virtual AP_AdvancedFailsafe *get_advanced_failsafe() const { return nullptr; };
virtual AP_VisualOdom *get_visual_odom() const { return nullptr; }
virtual bool set_mode(uint8_t mode) = 0;
Expand Down
1 change: 0 additions & 1 deletion libraries/GCS_MAVLink/GCS_Dummy.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class GCS_MAVLINK_Dummy : public GCS_MAVLINK
AP_Mission *get_mission() override { return nullptr; }
AP_Rally *get_rally() const override { return nullptr; };
AP_Camera *get_camera() const override { return nullptr; };
AP_ServoRelayEvents *get_servorelayevents() const override { return nullptr; }
const AP_FWVersion &get_fwver() const override { return fwver; }
void set_ekf_origin(const Location& loc) override { };

Expand Down
2 changes: 1 addition & 1 deletion libraries/GCS_MAVLink/GCS_ServoRelay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

MAV_RESULT GCS_MAVLINK::handle_servorelay_message(mavlink_command_long_t &packet)
{
AP_ServoRelayEvents *handler = get_servorelayevents();
AP_ServoRelayEvents *handler = AP::servorelayevents();
if (handler == nullptr) {
return MAV_RESULT_UNSUPPORTED;
}
Expand Down
1 change: 0 additions & 1 deletion libraries/GCS_MAVLink/examples/routing/routing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class GCS_MAVLINK_routing : public GCS_MAVLINK
Compass *get_compass() const override { return nullptr; };
AP_Mission *get_mission() override { return nullptr; }
AP_Rally *get_rally() const override { return nullptr; }
AP_ServoRelayEvents *get_servorelayevents() const override { return nullptr; }
AP_Camera *get_camera() const override { return nullptr; };
uint8_t sysid_my_gcs() const override { return 1; }
bool set_mode(uint8_t mode) override { return false; };
Expand Down

0 comments on commit 682679c

Please sign in to comment.