From a62dc3b3e0e44fdb0dd2d0420b4f17fcbeeea7e1 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Mon, 25 Jan 2021 14:31:31 +0100 Subject: [PATCH] Rover: disable switching and arming in INITIALIZING mode --- Rover/mode.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Rover/mode.h b/Rover/mode.h index 44fd263d36..85973c3c2e 100644 --- a/Rover/mode.h +++ b/Rover/mode.h @@ -638,9 +638,14 @@ public: // methods that affect movement of the vehicle in this mode void update() override { } + // do not allow arming from this mode + bool allows_arming() const override { return false; } + // attributes for mavlink system status reporting bool has_manual_input() const override { return true; } bool attitude_stabilized() const override { return false; } +protected: + bool _enter() override { return false; }; }; class ModeFollow : public Mode