1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Actual check for eeprom board identifier is correct

This commit is contained in:
blckmn 2017-01-05 22:15:18 +11:00
parent 7ccdd5a90d
commit 10f7fe1a68
2 changed files with 4 additions and 1 deletions

View file

@ -142,6 +142,9 @@ bool isEEPROMContentValid(void)
if (temp->size != sizeof(master_t) || temp->magic_be != 0xBE || temp->magic_ef != 0xEF)
return false;
if (strncasecmp(temp->boardIdentifier, TARGET_BOARD_IDENTIFIER, sizeof(TARGET_BOARD_IDENTIFIER)))
return false;
// verify integrity of temporary copy
checksum = calculateChecksum((const uint8_t *) temp, sizeof(master_t));
if (checksum != 0)