mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
Removed profile storage code from writeEEProm() to remove the boolean
flag from the method signature. Now it is clear when the current profile needs to be stored.
This commit is contained in:
parent
e969d184e6
commit
3daaf66b14
7 changed files with 28 additions and 20 deletions
|
@ -835,7 +835,7 @@ static void cliProfile(char *cmdline)
|
|||
i = atoi(cmdline);
|
||||
if (i >= 0 && i <= 2) {
|
||||
mcfg.current_profile = i;
|
||||
writeEEPROM(0, false);
|
||||
writeEEPROM(0);
|
||||
cliProfile("");
|
||||
}
|
||||
}
|
||||
|
@ -844,7 +844,8 @@ static void cliProfile(char *cmdline)
|
|||
static void cliSave(char *cmdline)
|
||||
{
|
||||
cliPrint("Saving...");
|
||||
writeEEPROM(0, true);
|
||||
copyCurrentProfileToProfileSlot(mcfg.current_profile);
|
||||
writeEEPROM(0);
|
||||
cliPrint("\r\nRebooting...");
|
||||
delay(10);
|
||||
systemReset(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue