From 4ca34ea448207a4cec96bb8ca1bee04df6ed283d Mon Sep 17 00:00:00 2001 From: murata Date: Thu, 6 Feb 2020 00:29:36 +0900 Subject: [PATCH] Rover: White space is tab code Rover: White space is tab code --- APMrover2/fence.cpp | 48 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/APMrover2/fence.cpp b/APMrover2/fence.cpp index 354c353afb..84722f4d1b 100644 --- a/APMrover2/fence.cpp +++ b/APMrover2/fence.cpp @@ -20,30 +20,30 @@ void Rover::fence_check() if (g2.fence.get_action() != Failsafe_Action_None) { // if within 100m of the fence, it will take the action specified by the FENCE_ACTION parameter if (g2.fence.get_breach_distance(new_breaches) <= AC_FENCE_GIVE_UP_DISTANCE) { - switch (g2.fence.get_action()) { - case Failsafe_Action_None: - break; - case Failsafe_Action_RTL: - if (!set_mode(mode_rtl, ModeReason::FENCE_BREACHED)) { - set_mode(mode_hold, ModeReason::FENCE_BREACHED); - } - break; - case Failsafe_Action_Hold: - set_mode(mode_hold, ModeReason::FENCE_BREACHED); - break; - case Failsafe_Action_SmartRTL: - if (!set_mode(mode_smartrtl, ModeReason::FENCE_BREACHED)) { - if (!set_mode(mode_rtl, ModeReason::FENCE_BREACHED)) { - set_mode(mode_hold, ModeReason::FENCE_BREACHED); - } - } - break; - case Failsafe_Action_SmartRTL_Hold: - if (!set_mode(mode_smartrtl, ModeReason::FENCE_BREACHED)) { - set_mode(mode_hold, ModeReason::FENCE_BREACHED); - } - break; - } + switch (g2.fence.get_action()) { + case Failsafe_Action_None: + break; + case Failsafe_Action_RTL: + if (!set_mode(mode_rtl, ModeReason::FENCE_BREACHED)) { + set_mode(mode_hold, ModeReason::FENCE_BREACHED); + } + break; + case Failsafe_Action_Hold: + set_mode(mode_hold, ModeReason::FENCE_BREACHED); + break; + case Failsafe_Action_SmartRTL: + if (!set_mode(mode_smartrtl, ModeReason::FENCE_BREACHED)) { + if (!set_mode(mode_rtl, ModeReason::FENCE_BREACHED)) { + set_mode(mode_hold, ModeReason::FENCE_BREACHED); + } + } + break; + case Failsafe_Action_SmartRTL_Hold: + if (!set_mode(mode_smartrtl, ModeReason::FENCE_BREACHED)) { + set_mode(mode_hold, ModeReason::FENCE_BREACHED); + } + break; + } } else { // if more than 100m outside the fence just force to HOLD set_mode(mode_hold, ModeReason::FENCE_BREACHED);