mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +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
|
@ -221,6 +221,7 @@ CMS_Menu cmsx_menuBlackbox = {
|
|||
#endif
|
||||
.onEnter = cmsx_Blackbox_onEnter,
|
||||
.onExit = cmsx_Blackbox_onExit,
|
||||
.checkRedirect = NULL,
|
||||
.entries = cmsx_menuBlackboxEntries
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue