mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 14:55:21 +03:00
Cli flash_erase rogress indicator conditional on CLI_MINIMAL_VERBOSITY.
This commit is contained in:
parent
cfc44df4ad
commit
5e1e2397e3
1 changed files with 8 additions and 1 deletions
|
@ -2256,13 +2256,19 @@ static void cliFlashInfo(char *cmdline)
|
|||
static void cliFlashErase(char *cmdline)
|
||||
{
|
||||
UNUSED(cmdline);
|
||||
uint32_t i;
|
||||
|
||||
#ifndef CLI_MINIMAL_VERBOSITY
|
||||
uint32_t i;
|
||||
cliPrintf("Erasing, please wait ... \r\n");
|
||||
#else
|
||||
cliPrintf("Erasing,\r\n");
|
||||
#endif
|
||||
|
||||
bufWriterFlush(cliWriter);
|
||||
flashfsEraseCompletely();
|
||||
|
||||
while (!flashfsIsReady()) {
|
||||
#ifndef CLI_MINIMAL_VERBOSITY
|
||||
cliPrintf(".");
|
||||
if (i++ > 120) {
|
||||
i=0;
|
||||
|
@ -2270,6 +2276,7 @@ static void cliFlashErase(char *cmdline)
|
|||
}
|
||||
|
||||
bufWriterFlush(cliWriter);
|
||||
#endif
|
||||
delay(100);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue