mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Add CMS menu entry level control of forced reboot on changes
CMS menu items can now be defined with a `REBOOT_REQUIRED` flag. If the user changes flagged elements the the exit/save options will change to `EXIT&REBOOT` and `SAVE&REBOOT` - ensuring that the changed items will be handled properly. This should be used for options where runtime changes either won't take effect (because they are read at boot), or for items that could have unexpected behavior if changed. Several appropriate menus have been updated to include the flag. To accomodate the dynamic nature of the save/exit options, the individual options have been removed from the main menu and replaced with a `SAVE/EXIT` submenu. This is the same menu that is presented as the quick-access popup save menu (yaw-right). This menu will adapt to requiring a reboot if any flagged setting is changed. Additionally the `REBOOT_REQD` arming disabled reason will be set (cleared by the reboot).
This commit is contained in:
parent
7cd030559d
commit
9081bd3338
9 changed files with 119 additions and 42 deletions
|
@ -147,4 +147,6 @@ void systemReset(void) {}
|
|||
void setArmingDisabled(armingDisableFlags_e flag) { UNUSED(flag); }
|
||||
void unsetArmingDisabled(armingDisableFlags_e flag) { UNUSED(flag); }
|
||||
bool IS_RC_MODE_ACTIVE(boxId_e) { return false; }
|
||||
void setRebootRequired(void) {}
|
||||
bool getRebootRequired(void) { return false; }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue