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:
parent
f45c5c5355
commit
3370752442
1 changed files with 6 additions and 0 deletions
|
@ -35,6 +35,7 @@
|
||||||
#include "drivers/time.h"
|
#include "drivers/time.h"
|
||||||
|
|
||||||
#include "displayport_crsf.h"
|
#include "displayport_crsf.h"
|
||||||
|
#include "fc/runtime_config.h"
|
||||||
|
|
||||||
#define CRSF_DISPLAY_PORT_OPEN_DELAY_MS 400
|
#define CRSF_DISPLAY_PORT_OPEN_DELAY_MS 400
|
||||||
#define CRSF_DISPLAY_PORT_CLEAR_DELAY_MS 45
|
#define CRSF_DISPLAY_PORT_CLEAR_DELAY_MS 45
|
||||||
|
@ -155,6 +156,11 @@ crsfDisplayPortScreen_t *crsfDisplayPortScreen(void)
|
||||||
|
|
||||||
void crsfDisplayPortMenuOpen(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) {
|
if (cmsInMenu) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue