[FLASHFS] Reinitialise flashFs after erasing flash chip. (#8237)

[FLASHFS] Reinitialise flashFs after erasing flash chip.
This commit is contained in:
Michael Keller 2019-05-11 23:41:10 +12:00 committed by GitHub
commit 31a059d4d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -2239,6 +2239,7 @@ static void cliFlashErase(char *cmdline)
bufWriterFlush(cliWriter); bufWriterFlush(cliWriter);
flashfsEraseCompletely(); flashfsEraseCompletely();
flashfsInit();
while (!flashfsIsReady()) { while (!flashfsIsReady()) {
#ifndef MINIMAL_CLI #ifndef MINIMAL_CLI

View File

@ -2342,6 +2342,7 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
#ifdef USE_FLASHFS #ifdef USE_FLASHFS
case MSP_DATAFLASH_ERASE: case MSP_DATAFLASH_ERASE:
flashfsEraseCompletely(); flashfsEraseCompletely();
flashfsInit();
break; break;
#endif #endif