Option UNITS=IMPERIAL added
SD card archive function continued (doesn't delete the model until function finished) Alternate view for outputs in Main Views (Bars and Numbers) GPS speed was badly displayed (ap instead of bp)
This commit is contained in:
+1
-1
@@ -439,7 +439,7 @@ FRESULT f_readdir (DIR*, FILINFO*); /* Read a directory item */
|
||||
FRESULT f_stat (const TCHAR*, FILINFO*); /* Get file status */
|
||||
|
||||
#if !_FS_READONLY
|
||||
FRESULT f_write (FIL*, const void*, UINT, UINT*); /* Write data to a file */
|
||||
FRESULT f_write (FIL*, const BYTE *, UINT, UINT*); /* Write data to a file */
|
||||
FRESULT f_getfree (const TCHAR*, DWORD*, FATFS**); /* Get number of free clusters on the drive */
|
||||
FRESULT f_truncate (FIL*); /* Truncate file */
|
||||
FRESULT f_sync (FIL*); /* Flush cached data of a writing file */
|
||||
|
||||
@@ -40,6 +40,7 @@ FIL g_oLogFile;
|
||||
int8_t g_logState = 0; // 0=closed, >0=opened, <0=error
|
||||
const pm_char * g_logError = NULL;
|
||||
|
||||
// TODO initSDCard()
|
||||
void initLogs()
|
||||
{
|
||||
// Determine and set log file filename
|
||||
@@ -65,6 +66,18 @@ void initLogs()
|
||||
return;
|
||||
}
|
||||
|
||||
DIR dir;
|
||||
result = f_opendir(&dir, MODELS_PATH);
|
||||
if (result != FR_OK) {
|
||||
if (result == FR_NO_PATH)
|
||||
result = f_mkdir(MODELS_PATH);
|
||||
if (result != FR_OK) {
|
||||
g_logState = -result;
|
||||
g_logError = PSTR("Check " MODELS_PATH " folder");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Loop, skipping over any existing log files ... _000, _001, etc. until we have a unique file name
|
||||
while (1)
|
||||
{
|
||||
|
||||
+3
-2
@@ -34,9 +34,10 @@
|
||||
#ifndef LOGS_H
|
||||
#define LOGS_H
|
||||
|
||||
#define LOG_PATH "/O9XLOGS" // no trailing slash = important
|
||||
#define LOG_PATH "/9XLOGS" // no trailing slash = important
|
||||
#define MODELS_PATH "/9XMODELS"
|
||||
|
||||
extern char g_logFilename[21]; // "/O9XLOGS/M00_000.CSV\0" max required length = 21
|
||||
extern char g_logFilename[21]; // "/9XLOGS/M00_000.CSV\0" max required length = 21
|
||||
extern int8_t g_logState; // 0=closed, >0 = opened, <0 is error
|
||||
extern FATFS g_FATFS_Obj;
|
||||
extern FIL g_oLogFile;
|
||||
|
||||
Reference in New Issue
Block a user