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;
|
uint32_t preferred_beeper_off_flags;
|
||||||
|
|
||||||
char name[MAX_NAME_LENGTH + 1];
|
char name[MAX_NAME_LENGTH + 1];
|
||||||
|
char boardIdentifier[sizeof(TARGET_BOARD_IDENTIFIER)];
|
||||||
|
|
||||||
uint8_t magic_ef; // magic number, should be 0xEF
|
uint8_t magic_ef; // magic number, should be 0xEF
|
||||||
uint8_t chk; // XOR checksum
|
uint8_t chk; // XOR checksum
|
||||||
|
|
|
@ -837,6 +837,9 @@ void createDefaultConfig(master_t *config)
|
||||||
|
|
||||||
resetStatusLedConfig(&config->statusLedConfig);
|
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)
|
#if defined(TARGET_CONFIG)
|
||||||
targetConfiguration(config);
|
targetConfiguration(config);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue