From 840507970e25766cabec02469cf41d80d1141a56 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Thu, 14 Nov 2024 17:48:08 +0000 Subject: [PATCH] Copter: tell the gcs that the number of available modes has changed when registering a custom mode --- ArduCopter/Copter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArduCopter/Copter.cpp b/ArduCopter/Copter.cpp index 8914d5a4ef..0f263b89c0 100644 --- a/ArduCopter/Copter.cpp +++ b/ArduCopter/Copter.cpp @@ -448,6 +448,10 @@ AP_Vehicle::custom_mode_state* Copter::register_custom_mode(const uint8_t num, c // Allocation failure return nullptr; } + + // Registration sucsessful, notify the GCS that it should re-request the avalable modes + gcs().available_modes_changed(); + return &mode_guided_custom[i]->state; } }