Merge pull request #3658 from blckmn/boardIdent_fix
Fix for reset on save
This commit is contained in:
commit
bacc6e6fb1
|
@ -141,11 +141,6 @@ bool isEEPROMContentValid(void)
|
|||
|
||||
eepromConfigSize = p - &__config_start;
|
||||
|
||||
/* TODO: Check to be removed when moving to generic targets */
|
||||
if (strncasecmp(systemConfig()->boardIdentifier, TARGET_BOARD_IDENTIFIER, sizeof(TARGET_BOARD_IDENTIFIER))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// CRC has the property that if the CRC itself is included in the calculation the resulting CRC will have constant value
|
||||
return crc == CRC_CHECK_VALUE;
|
||||
}
|
||||
|
|
|
@ -2969,9 +2969,10 @@ static void cliVersion(char *cmdline)
|
|||
{
|
||||
UNUSED(cmdline);
|
||||
|
||||
cliPrintLinef("# %s / %s %s %s / %s (%s)",
|
||||
cliPrintLinef("# %s / %s (%s) %s %s / %s (%s)",
|
||||
FC_FIRMWARE_NAME,
|
||||
targetName,
|
||||
systemConfig()->boardIdentifier,
|
||||
FC_VERSION_STRING,
|
||||
buildDate,
|
||||
buildTime,
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue