Fixes #2007: Handle full SD card in openLogs(). SD card info menu implemented for Taranis, added display of free sectors. Disk IO simulation (all ported from master)

This commit is contained in:
Damjan Adamic
2015-02-20 21:59:24 +01:00
parent 9e65cd386b
commit 9d777f799d
28 changed files with 1048 additions and 680 deletions
+3 -1
View File
@@ -59,6 +59,9 @@ const pm_char *openLogs()
if (!sdMounted())
return STR_NO_SDCARD;
if (sdGetFreeSectors() == 0)
return STR_SDCARD_FULL;
// check and create folder here
strcpy_P(filename, STR_LOGS_PATH);
result = f_opendir(&folder, filename);
@@ -193,7 +196,6 @@ void writeHeader()
#endif
}
// TODO test when disk full
void writeLogs()
{
static const pm_char * error_displayed = NULL;