Rover: Expose the AFS instance to MAVLink

This commit is contained in:
Michael du Breuil 2017-07-24 23:36:40 -07:00 committed by Francisco Ferreira
parent 5cfe4d5a8c
commit a98c8427dd
2 changed files with 10 additions and 0 deletions

View File

@ -1415,6 +1415,15 @@ AP_ServoRelayEvents *GCS_MAVLINK_Rover::get_servorelayevents() const
return &rover.ServoRelayEvents;
}
AP_AdvancedFailsafe *GCS_MAVLINK_Rover::get_advanced_failsafe() const
{
#if ADVANCED_FAILSAFE == ENABLED
return &rover.g2.afs;
#else
return nullptr;
#endif
}
Compass *GCS_MAVLINK_Rover::get_compass() const
{
return &rover.compass;

View File

@ -22,6 +22,7 @@ protected:
AP_Camera *get_camera() const override;
AP_ServoRelayEvents *get_servorelayevents() const override;
AP_GPS *get_gps() const override;
AP_AdvancedFailsafe *get_advanced_failsafe() const override;
uint8_t sysid_my_gcs() const override;