Fix SDcard size and format issue (#5004)
* - fix overflow in SDcard size computation - fix format function - implement more informative format error handling * Move to a function
This commit is contained in:
@@ -151,14 +151,10 @@ bool menuRadioSdManager(event_t _event)
|
||||
showMessageBox(STR_FORMATTING);
|
||||
logsClose();
|
||||
audioQueue.stopSD();
|
||||
BYTE work[_MAX_SS];
|
||||
if (f_mkfs(0, FM_FAT32, 0, work, sizeof(work)) == FR_OK) {
|
||||
if(sdCardFormat()) {
|
||||
f_chdir("/");
|
||||
REFRESH_FILES();
|
||||
}
|
||||
else {
|
||||
POPUP_WARNING(STR_SDCARD_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
event_t event = (EVT_KEY_MASK(_event) == KEY_ENTER ? 0 : _event);
|
||||
|
||||
Reference in New Issue
Block a user