mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 06:45:16 +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
|
@ -40,7 +40,8 @@ void ACC_Common(void)
|
|||
mcfg.accZero[GI_YAW] = (a[GI_YAW] + (CALIBRATING_ACC_CYCLES / 2)) / CALIBRATING_ACC_CYCLES - acc_1G;
|
||||
cfg.angleTrim[AI_ROLL] = 0;
|
||||
cfg.angleTrim[AI_PITCH] = 0;
|
||||
writeEEPROM(1, true); // write accZero in EEPROM
|
||||
copyCurrentProfileToProfileSlot(mcfg.current_profile);
|
||||
writeEEPROM(1); // write accZero in EEPROM
|
||||
}
|
||||
calibratingA--;
|
||||
}
|
||||
|
@ -90,7 +91,8 @@ void ACC_Common(void)
|
|||
mcfg.accZero[GI_YAW] = b[GI_YAW] / 50 - acc_1G; // for nunchuk 200=1G
|
||||
cfg.angleTrim[AI_ROLL] = 0;
|
||||
cfg.angleTrim[AI_PITCH] = 0;
|
||||
writeEEPROM(1, true); // write accZero in EEPROM
|
||||
copyCurrentProfileToProfileSlot(mcfg.current_profile);
|
||||
writeEEPROM(1); // write accZero in EEPROM
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue