Merge with latest 2.3

This commit is contained in:
Bertrand Songis
2020-01-08 16:35:30 +01:00
91 changed files with 1139 additions and 860 deletions
+15
View File
@@ -978,10 +978,15 @@ void sdPoll10ms()
// TODO everything here should not be in the driver layer ...
FATFS g_FATFS_Obj;
#if defined(LOG_TELEMETRY)
FIL g_telemetryFile = {};
#endif
#if defined(LOG_BLUETOOTH)
FIL g_bluetoothFile = {};
#endif
#if defined(BOOT)
void sdInit(void)
{
@@ -1016,6 +1021,13 @@ void sdMount()
f_lseek(&g_telemetryFile, f_size(&g_telemetryFile)); // append
}
#endif
#if defined(LOG_BLUETOOTH)
f_open(&g_bluetoothFile, LOGS_PATH "/bluetooth.log", FA_OPEN_ALWAYS | FA_WRITE);
if (f_size(&g_bluetoothFile) > 0) {
f_lseek(&g_bluetoothFile, f_size(&g_bluetoothFile)); // append
}
#endif
}
}
@@ -1025,6 +1037,9 @@ void sdDone()
audioQueue.stopSD();
#if defined(LOG_TELEMETRY)
f_close(&g_telemetryFile);
#endif
#if defined(LOG_BLUETOOTH)
f_close(&g_bluetoothFile);
#endif
f_mount(nullptr, "", 0); // unmount SD
}