ArduCopter: use mission singleton inside AP_AdvancedFailsafe

This commit is contained in:
Peter Barker 2021-07-30 22:25:40 +10:00 committed by Andrew Tridgell
parent 3013017369
commit f21cddcf0f
3 changed files with 3 additions and 8 deletions

View File

@ -1094,7 +1094,7 @@ ParametersG2::ParametersG2(void)
, proximity() , proximity()
#endif #endif
#if ADVANCED_FAILSAFE == ENABLED #if ADVANCED_FAILSAFE == ENABLED
,afs(copter.mode_auto.mission) ,afs()
#endif #endif
#if MODE_SMARTRTL_ENABLED == ENABLED #if MODE_SMARTRTL_ENABLED == ENABLED
,smart_rtl() ,smart_rtl()

View File

@ -6,12 +6,6 @@
#if ADVANCED_FAILSAFE == ENABLED #if ADVANCED_FAILSAFE == ENABLED
// Constructor
AP_AdvancedFailsafe_Copter::AP_AdvancedFailsafe_Copter(AP_Mission &_mission) :
AP_AdvancedFailsafe(_mission)
{}
/* /*
setup radio_out values for all channels to termination values setup radio_out values for all channels to termination values
*/ */

View File

@ -27,7 +27,8 @@
class AP_AdvancedFailsafe_Copter : public AP_AdvancedFailsafe class AP_AdvancedFailsafe_Copter : public AP_AdvancedFailsafe
{ {
public: public:
AP_AdvancedFailsafe_Copter(AP_Mission &_mission);
using AP_AdvancedFailsafe::AP_AdvancedFailsafe;
// called to set all outputs to termination state // called to set all outputs to termination state
void terminate_vehicle(void) override; void terminate_vehicle(void) override;