mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Replace individual CMS vtx menus with a single entry that redirects to the correct protocol menu
Instead of having individual menus for RTC6705, SmartAudio, and Tramp, Now there is a single VTX menu that detects the type of active device and redirects to the appropriate protocol menu. Reduces confusion and chances of erroneously using the wrong VTX menu. Fixes a problem where the Tramp menu could be used to change band/channel/power even though the VTX was a SmartAudio device. If the VTX is not configured or not communicating, a more informative message will be presented rather than a partially populated protocol menu. For example: ``` VTX NOT RESPONDING OR NOT CONFIGURED > BACK ``` Extends the CMS menu capabilities by adding an optional `redirectCheck` function that can conditionally return a menu that should be redirected to instead of the current menu. This redirect happens before any processing happens for the original menu. Adds flexibility to make the CMS menus have a more dynamic aspect.
This commit is contained in:
parent
1c8d41b952
commit
5c98726318
19 changed files with 206 additions and 16 deletions
|
@ -49,6 +49,9 @@ CMS_Menu cmsx_menuSaveExit = {
|
|||
.GUARD_text = "MENUSAVE",
|
||||
.GUARD_type = OME_MENU,
|
||||
#endif
|
||||
.onEnter = NULL,
|
||||
.onExit = NULL,
|
||||
.checkRedirect = NULL,
|
||||
.entries = cmsx_menuSaveExitEntries
|
||||
};
|
||||
|
||||
|
@ -66,6 +69,9 @@ CMS_Menu cmsx_menuSaveExitReboot = {
|
|||
.GUARD_text = "MENUSAVE",
|
||||
.GUARD_type = OME_MENU,
|
||||
#endif
|
||||
.onEnter = NULL,
|
||||
.onExit = NULL,
|
||||
.checkRedirect = NULL,
|
||||
.entries = cmsx_menuSaveExitRebootEntries
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue