diff --git a/src/main/config/config_master.h b/src/main/config/config_master.h index cbe9a26c0..c5416882a 100644 --- a/src/main/config/config_master.h +++ b/src/main/config/config_master.h @@ -241,6 +241,7 @@ typedef struct master_s { uint32_t preferred_beeper_off_flags; char name[MAX_NAME_LENGTH + 1]; + char boardIdentifier[sizeof(TARGET_BOARD_IDENTIFIER)]; uint8_t magic_ef; // magic number, should be 0xEF uint8_t chk; // XOR checksum diff --git a/src/main/fc/config.c b/src/main/fc/config.c index d7984caf2..5a5fb99ea 100755 --- a/src/main/fc/config.c +++ b/src/main/fc/config.c @@ -837,6 +837,9 @@ void createDefaultConfig(master_t *config) resetStatusLedConfig(&config->statusLedConfig); + /* merely to force a reset if the person inadvertently flashes the wrong target */ + strncpy(config->boardIdentifier, TARGET_BOARD_IDENTIFIER, MIN(sizeof(TARGET_BOARD_IDENTIFIER), sizeof(config->boardIdentifier))); + #if defined(TARGET_CONFIG) targetConfiguration(config); #endif