mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
OP-499 Erase settings bug: Make hte flash chip read a wrong value for 1 second
before wiping settings.
This commit is contained in:
parent
4b04a5d9ea
commit
5dc0f397a6
@ -61,7 +61,7 @@ struct fileHeader {
|
||||
#define OBJECT_TABLE_START 0x00000010
|
||||
#define OBJECT_TABLE_END 0x00001000
|
||||
#define SECTOR_SIZE 0x00001000
|
||||
#define MAX_BADMAGIC 4
|
||||
#define MAX_BADMAGIC 1000
|
||||
|
||||
/**
|
||||
* @brief Initialize the flash object setting FS
|
||||
@ -72,7 +72,7 @@ int32_t PIOS_FLASHFS_Init()
|
||||
|
||||
// Check for valid object table or create one
|
||||
uint32_t object_table_magic;
|
||||
uint8_t magic_fail_count = 0;
|
||||
uint32_t magic_fail_count = 0;
|
||||
bool magic_good = false;
|
||||
|
||||
while(!magic_good) {
|
||||
@ -85,7 +85,7 @@ int32_t PIOS_FLASHFS_Init()
|
||||
magic_fail_count = 0;
|
||||
magic_good = true;
|
||||
} else {
|
||||
PIOS_DELAY_WaituS(100);
|
||||
PIOS_DELAY_WaituS(1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user