Copter: correct compilation when AFS enabled

This commit is contained in:
Peter Barker 2020-10-02 12:07:18 +10:00 committed by Randy Mackay
parent 1226808909
commit 9b22532eac
1 changed files with 4 additions and 4 deletions

View File

@ -374,14 +374,14 @@ void Copter::do_failsafe_action(Failsafe_Action action, ModeReason reason){
case Failsafe_Action_SmartRTL_Land: case Failsafe_Action_SmartRTL_Land:
set_mode_SmartRTL_or_land_with_pause(reason); set_mode_SmartRTL_or_land_with_pause(reason);
break; break;
case Failsafe_Action_Terminate: case Failsafe_Action_Terminate: {
#if ADVANCED_FAILSAFE == ENABLED #if ADVANCED_FAILSAFE == ENABLED
char battery_type_str[17]; g2.afs.gcs_terminate(true, "Failsafe");
snprintf(battery_type_str, 17, "%s battery", type_str);
g2.afs.gcs_terminate(true, battery_type_str);
#else #else
arming.disarm(); arming.disarm();
#endif #endif
}
break;
} }
} }