SPORT_FILE_LOG renamed to LOG_TELEMETRY. And logs are now stored in telemetry.log

This commit is contained in:
Bertrand Songis
2016-01-30 12:58:00 +01:00
parent 3913a36aeb
commit c36acc5372
5 changed files with 51 additions and 51 deletions
+24 -24
View File
@@ -1,23 +1,23 @@
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "../../opentx.h"
#include "../../thirdparty/FatFs/diskio.h"
#include "../../thirdparty/FatFs/ff.h"
@@ -938,7 +938,7 @@ void sdPoll10ms()
// TODO everything here should not be in the driver layer ...
FATFS g_FATFS_Obj;
#if defined(SPORT_FILE_LOG)
#if defined(LOG_TELEMETRY)
FIL g_telemetryFile = {0};
#endif
@@ -965,8 +965,8 @@ void sdInit(void)
referenceSystemAudioFiles();
#if defined(SPORT_FILE_LOG)
f_open(&g_telemetryFile, LOGS_PATH "/sport.log", FA_OPEN_ALWAYS | FA_WRITE);
#if defined(LOG_TELEMETRY)
f_open(&g_telemetryFile, LOGS_PATH "/telemetry.log", FA_OPEN_ALWAYS | FA_WRITE);
if (f_size(&g_telemetryFile) > 0) {
f_lseek(&g_telemetryFile, f_size(&g_telemetryFile)); // append
}
@@ -978,7 +978,7 @@ void sdDone()
{
if (sdMounted()) {
audioQueue.stopSD();
#if defined(SPORT_FILE_LOG)
#if defined(LOG_TELEMETRY)
f_close(&g_telemetryFile);
#endif
f_mount(NULL, "", 0); // unmount SD