Skip to content

Commit

Permalink
Rover: fix ModeReason on fence breaches
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani committed Jul 1, 2024
1 parent 38ca478 commit fa38376
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Rover/fence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ void Rover::fence_check()
case FailsafeAction::None:
break;
case FailsafeAction::SmartRTL:
if (set_mode(mode_smartrtl, ModeReason::BATTERY_FAILSAFE)) {
if (set_mode(mode_smartrtl, ModeReason::FENCE_BREACHED)) {
break;
}
FALLTHROUGH;
case FailsafeAction::RTL:
if (set_mode(mode_rtl, ModeReason::BATTERY_FAILSAFE)) {
if (set_mode(mode_rtl, ModeReason::FENCE_BREACHED)) {
break;
}
FALLTHROUGH;
case FailsafeAction::Hold:
set_mode(mode_hold, ModeReason::BATTERY_FAILSAFE);
set_mode(mode_hold, ModeReason::FENCE_BREACHED);
break;
case FailsafeAction::SmartRTL_Hold:
if (!set_mode(mode_smartrtl, ModeReason::FENCE_BREACHED)) {
Expand Down

0 comments on commit fa38376

Please sign in to comment.