mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
Instead of trying to latch the desired features...
...and apply them after a soft reset (which also required an additional write to flash), it is now such that features and settings are modified and stored in flash as before. After initialisation completes, the active features are latched and are not to be modified until the next startup. This guarantees that all saved modifications are persistent even when power is switched of (without a reset in between). When a soft reset is required, the active features and the currently configured features are used to detect if the oneshot feature has changed state, in which case motor PWM outputs are stopped and soft reset is done after a 1.5 second delay. During normal operation the active features will not change and all changes to features ordered via MSP commands or the CLI are applied to the configuration that gets saved to flash. The required effect of modifying features without changing the actions in the running mainloop is achieved. The user needs to be aware that changes to features are not applied immidiatly.
This commit is contained in:
parent
48570502cb
commit
b75de91f35
9 changed files with 57 additions and 8 deletions
|
@ -1410,6 +1410,7 @@ static void cliReboot(void) {
|
|||
cliPrint("\r\nRebooting");
|
||||
waitForSerialPortToFinishTransmitting(cliPort);
|
||||
stopMotors();
|
||||
handleOneshotFeatureChangeOnRestart();
|
||||
systemReset();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue