From 591c7d55c7528c5f578eaf5510ce893bebcbd9a4 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 25 Aug 2021 12:04:50 +1000 Subject: [PATCH] Rover: make bad-mode-number notification consistent across vehicles --- Rover/system.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Rover/system.cpp b/Rover/system.cpp index 20fdfb720c7cc..31a9cd589096f 100644 --- a/Rover/system.cpp +++ b/Rover/system.cpp @@ -248,6 +248,7 @@ bool Rover::set_mode(const uint8_t new_mode, ModeReason reason) static_assert(sizeof(Mode::Number) == sizeof(new_mode), "The new mode can't be mapped to the vehicles mode number"); Mode *mode = rover.mode_from_mode_num((enum Mode::Number)new_mode); if (mode == nullptr) { + notify_no_such_mode(new_mode); return false; } return rover.set_mode(*mode, reason);