1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 05:45:31 +03:00

Fix for reset on save

This commit is contained in:
blckmn 2017-07-29 20:59:13 +10:00
parent 03caa1cc8d
commit 3846dd5cf6
3 changed files with 7 additions and 6 deletions

View file

@ -265,6 +265,11 @@ void init(void)
ensureEEPROMContainsValidData();
readEEPROM();
/* TODO: Check to be removed when moving to generic targets */
if (strncasecmp(systemConfig()->boardIdentifier, TARGET_BOARD_IDENTIFIER, sizeof(TARGET_BOARD_IDENTIFIER))) {
resetEEPROM();
}
#if defined(STM32F4) && !defined(DISABLE_OVERCLOCK)
// If F4 Overclocking is set and System core clock is not correct a reset is forced
if (systemConfig()->cpu_overclock && SystemCoreClock != OC_FREQUENCY_HZ) {