1
0
Fork 0
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:
Dominic Clifton 2014-04-21 01:02:53 +01:00
parent e969d184e6
commit 3daaf66b14
7 changed files with 28 additions and 20 deletions

View file

@ -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
}
}