1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00

Disable entering CMS menu when armed (#14470)

This commit is contained in:
Lukas Lendvorsky 2025-06-23 02:15:28 +02:00 committed by GitHub
parent f45c5c5355
commit 3370752442
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,6 +35,7 @@
#include "drivers/time.h"
#include "displayport_crsf.h"
#include "fc/runtime_config.h"
#define CRSF_DISPLAY_PORT_OPEN_DELAY_MS 400
#define CRSF_DISPLAY_PORT_CLEAR_DELAY_MS 45
@ -155,6 +156,11 @@ crsfDisplayPortScreen_t *crsfDisplayPortScreen(void)
void crsfDisplayPortMenuOpen(void)
{
if (ARMING_FLAG(ARMED)) {
// when armed, make it impossible to open the menu (it wouldn't be possible to disarm)
return;
}
if (cmsInMenu) {
return;
}