mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 13:55:18 +03:00
Fix for reset on save
This commit is contained in:
parent
03caa1cc8d
commit
3846dd5cf6
3 changed files with 7 additions and 6 deletions
|
@ -141,11 +141,6 @@ bool isEEPROMContentValid(void)
|
||||||
|
|
||||||
eepromConfigSize = p - &__config_start;
|
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
|
// 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;
|
return crc == CRC_CHECK_VALUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2969,9 +2969,10 @@ static void cliVersion(char *cmdline)
|
||||||
{
|
{
|
||||||
UNUSED(cmdline);
|
UNUSED(cmdline);
|
||||||
|
|
||||||
cliPrintLinef("# %s / %s %s %s / %s (%s)",
|
cliPrintLinef("# %s / %s (%s) %s %s / %s (%s)",
|
||||||
FC_FIRMWARE_NAME,
|
FC_FIRMWARE_NAME,
|
||||||
targetName,
|
targetName,
|
||||||
|
systemConfig()->boardIdentifier,
|
||||||
FC_VERSION_STRING,
|
FC_VERSION_STRING,
|
||||||
buildDate,
|
buildDate,
|
||||||
buildTime,
|
buildTime,
|
||||||
|
|
|
@ -265,6 +265,11 @@ void init(void)
|
||||||
ensureEEPROMContainsValidData();
|
ensureEEPROMContainsValidData();
|
||||||
readEEPROM();
|
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 defined(STM32F4) && !defined(DISABLE_OVERCLOCK)
|
||||||
// If F4 Overclocking is set and System core clock is not correct a reset is forced
|
// If F4 Overclocking is set and System core clock is not correct a reset is forced
|
||||||
if (systemConfig()->cpu_overclock && SystemCoreClock != OC_FREQUENCY_HZ) {
|
if (systemConfig()->cpu_overclock && SystemCoreClock != OC_FREQUENCY_HZ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue