From 3f9215e8736ec09cb75b7100cd41ee492a63a61b Mon Sep 17 00:00:00 2001 From: Will Silva Date: Thu, 6 Oct 2016 10:18:14 -0700 Subject: [PATCH] gps_glitch: upon clearing GPS glitch failsafe, do not automatically revert to LOITER if in a battery failsafe --- ArduCopter/gps_glitch.pde | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArduCopter/gps_glitch.pde b/ArduCopter/gps_glitch.pde index 338caef2ee..bd372cf7c0 100644 --- a/ArduCopter/gps_glitch.pde +++ b/ArduCopter/gps_glitch.pde @@ -32,7 +32,9 @@ static void gps_glitch_off_event() { Log_Write_Error(ERROR_SUBSYSTEM_FAILSAFE_GPS, ERROR_CODE_FAILSAFE_RESOLVED); if (gps_glitch_switch_mode_on_resolve) { - set_mode(LOITER); + if (!failsafe.battery) { + set_mode(LOITER); + } gps_glitch_switch_mode_on_resolve = false; } } \ No newline at end of file