From f21cddcf0f696ea365991756d185ee623bc8daa4 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 30 Jul 2021 22:25:40 +1000 Subject: [PATCH] ArduCopter: use mission singleton inside AP_AdvancedFailsafe --- ArduCopter/Parameters.cpp | 2 +- ArduCopter/afs_copter.cpp | 6 ------ ArduCopter/afs_copter.h | 3 ++- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ArduCopter/Parameters.cpp b/ArduCopter/Parameters.cpp index 811311d316..d6eef8a068 100644 --- a/ArduCopter/Parameters.cpp +++ b/ArduCopter/Parameters.cpp @@ -1094,7 +1094,7 @@ ParametersG2::ParametersG2(void) , proximity() #endif #if ADVANCED_FAILSAFE == ENABLED - ,afs(copter.mode_auto.mission) + ,afs() #endif #if MODE_SMARTRTL_ENABLED == ENABLED ,smart_rtl() diff --git a/ArduCopter/afs_copter.cpp b/ArduCopter/afs_copter.cpp index efe6a84a3b..2eb2c1db14 100644 --- a/ArduCopter/afs_copter.cpp +++ b/ArduCopter/afs_copter.cpp @@ -6,12 +6,6 @@ #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 */ diff --git a/ArduCopter/afs_copter.h b/ArduCopter/afs_copter.h index 04365da682..fd73351973 100644 --- a/ArduCopter/afs_copter.h +++ b/ArduCopter/afs_copter.h @@ -27,7 +27,8 @@ class AP_AdvancedFailsafe_Copter : public AP_AdvancedFailsafe { public: - AP_AdvancedFailsafe_Copter(AP_Mission &_mission); + + using AP_AdvancedFailsafe::AP_AdvancedFailsafe; // called to set all outputs to termination state void terminate_vehicle(void) override;