Rover: enter Hold on failure to enter RTL fs action

This commit is contained in:
Dylan Herman 2018-01-18 17:19:20 -05:00 committed by Randy Mackay
parent f3b794f698
commit 9d7eb188d1
1 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,9 @@ void Rover::failsafe_trigger(uint8_t failsafe_type, bool on)
case 0:
break;
case 1:
set_mode(mode_rtl, MODE_REASON_FAILSAFE);
if (!set_mode(mode_rtl, MODE_REASON_FAILSAFE)) {
set_mode(mode_hold, MODE_REASON_FAILSAFE);
}
break;
case 2:
set_mode(mode_hold, MODE_REASON_FAILSAFE);