mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Ensured board info is preserved through invalid EEPROM version triggered reset.
This commit is contained in:
parent
432f330e60
commit
467a490a53
3 changed files with 15 additions and 4 deletions
|
@ -240,13 +240,14 @@ void init(void)
|
|||
initEEPROM();
|
||||
|
||||
ensureEEPROMStructureIsValid();
|
||||
|
||||
bool readSuccess = readEEPROM();
|
||||
|
||||
#if defined(USE_BOARD_INFO)
|
||||
initBoardInformation();
|
||||
#endif
|
||||
|
||||
if (!readSuccess || strncasecmp(systemConfig()->boardIdentifier, TARGET_BOARD_IDENTIFIER, sizeof(TARGET_BOARD_IDENTIFIER))) {
|
||||
if (!readSuccess || !isEEPROMVersionValid() || strncasecmp(systemConfig()->boardIdentifier, TARGET_BOARD_IDENTIFIER, sizeof(TARGET_BOARD_IDENTIFIER))) {
|
||||
resetEEPROM();
|
||||
|
||||
activateConfig();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue