mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-21 15:25:29 +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
|
@ -357,7 +357,7 @@ static void evaluateCommand(void)
|
|||
if (mcfg.current_profile > 2)
|
||||
mcfg.current_profile = 0;
|
||||
// this writes new profile index and re-reads it
|
||||
writeEEPROM(0, false);
|
||||
writeEEPROM(0);
|
||||
}
|
||||
headSerialReply(0);
|
||||
break;
|
||||
|
@ -618,7 +618,8 @@ static void evaluateCommand(void)
|
|||
if (f.ARMED) {
|
||||
headSerialError(0);
|
||||
} else {
|
||||
writeEEPROM(0, true);
|
||||
copyCurrentProfileToProfileSlot(mcfg.current_profile);
|
||||
writeEEPROM(0);
|
||||
headSerialReply(0);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue