mirror of https://github.com/ArduPilot/ardupilot
Copter: correct compilation when AFS enabled
This commit is contained in:
parent
1226808909
commit
9b22532eac
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue