console noise reduction
This commit is contained in:
parent
3a275b4388
commit
d516c91af2
|
@ -91,8 +91,15 @@ static FATFS MMC_FS;
|
||||||
|
|
||||||
static LoggingWithStorage logger("mmcCard");
|
static LoggingWithStorage logger("mmcCard");
|
||||||
|
|
||||||
|
static int fatFsErrors = 0;
|
||||||
|
|
||||||
// print FAT error function
|
// print FAT error function
|
||||||
static void printError(const char *str, FRESULT f_error) {
|
static void printError(const char *str, FRESULT f_error) {
|
||||||
|
if (fatFsErrors++ > 16) {
|
||||||
|
// no reason to spam the console
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
scheduleMsg(&logger, "FATfs Error \"%s\" %d", str, f_error);
|
scheduleMsg(&logger, "FATfs Error \"%s\" %d", str, f_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue