Copter: correct compilation when AFS is enabled

This commit is contained in:
Peter Barker 2018-04-07 00:32:27 +10:00 committed by Randy Mackay
parent d0425c7b2f
commit d219540554
3 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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)
{}

View File

@ -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