mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 06:45:16 +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)
|
static void cliFlashErase(char *cmdline)
|
||||||
{
|
{
|
||||||
UNUSED(cmdline);
|
UNUSED(cmdline);
|
||||||
uint32_t i;
|
|
||||||
|
|
||||||
|
#ifndef CLI_MINIMAL_VERBOSITY
|
||||||
|
uint32_t i;
|
||||||
cliPrintf("Erasing, please wait ... \r\n");
|
cliPrintf("Erasing, please wait ... \r\n");
|
||||||
|
#else
|
||||||
|
cliPrintf("Erasing,\r\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
bufWriterFlush(cliWriter);
|
bufWriterFlush(cliWriter);
|
||||||
flashfsEraseCompletely();
|
flashfsEraseCompletely();
|
||||||
|
|
||||||
while (!flashfsIsReady()) {
|
while (!flashfsIsReady()) {
|
||||||
|
#ifndef CLI_MINIMAL_VERBOSITY
|
||||||
cliPrintf(".");
|
cliPrintf(".");
|
||||||
if (i++ > 120) {
|
if (i++ > 120) {
|
||||||
i=0;
|
i=0;
|
||||||
|
@ -2270,6 +2276,7 @@ static void cliFlashErase(char *cmdline)
|
||||||
}
|
}
|
||||||
|
|
||||||
bufWriterFlush(cliWriter);
|
bufWriterFlush(cliWriter);
|
||||||
|
#endif
|
||||||
delay(100);
|
delay(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue