diff --git a/flight/PiOS/Common/pios_flashfs_objlist.c b/flight/PiOS/Common/pios_flashfs_objlist.c index 2b2fe06fa..b252ef81e 100644 --- a/flight/PiOS/Common/pios_flashfs_objlist.c +++ b/flight/PiOS/Common/pios_flashfs_objlist.c @@ -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); } }