Fix for flashing incorrect target, and wrong defaults persisting in flash.
This commit is contained in:
parent
56f0083237
commit
7ccdd5a90d
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue