From d2195405549b45463b27233d366ce3e73152436b Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 7 Apr 2018 00:32:27 +1000 Subject: [PATCH] Copter: correct compilation when AFS is enabled --- ArduCopter/Parameters.cpp | 2 +- ArduCopter/afs_copter.cpp | 2 +- ArduCopter/events.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ArduCopter/Parameters.cpp b/ArduCopter/Parameters.cpp index 5235700cd6..979b41e1d3 100644 --- a/ArduCopter/Parameters.cpp +++ b/ArduCopter/Parameters.cpp @@ -1004,7 +1004,7 @@ ParametersG2::ParametersG2(void) , proximity(copter.serial_manager) #endif #if ADVANCED_FAILSAFE == ENABLED - ,afs(copter.mission, copter.barometer, copter.gps, copter.rcmap) + ,afs(copter.mission, copter.gps, copter.rcmap) #endif #if MODE_SMARTRTL_ENABLED == ENABLED ,smart_rtl() diff --git a/ArduCopter/afs_copter.cpp b/ArduCopter/afs_copter.cpp index 54ce566fce..47785edff6 100644 --- a/ArduCopter/afs_copter.cpp +++ b/ArduCopter/afs_copter.cpp @@ -8,7 +8,7 @@ // Constructor AP_AdvancedFailsafe_Copter::AP_AdvancedFailsafe_Copter(AP_Mission &_mission, const AP_GPS &_gps, const RCMapper &_rcmap) : - AP_AdvancedFailsafe(_mission, _baro, _gps, _rcmap) + AP_AdvancedFailsafe(_mission, _gps, _rcmap) {} diff --git a/ArduCopter/events.cpp b/ArduCopter/events.cpp index 3a525266e6..1de335389e 100644 --- a/ArduCopter/events.cpp +++ b/ArduCopter/events.cpp @@ -75,7 +75,7 @@ void Copter::handle_battery_failsafe(const char *type_str, const int8_t action) #if ADVANCED_FAILSAFE == ENABLED char battery_type_str[17]; snprintf(battery_type_str, 17, "%s battery", type_str); - afs.gcs_terminate(true, battery_type_str); + g2.afs.gcs_terminate(true, battery_type_str); #else init_disarm_motors(); #endif