59,7 → 59,7 |
#include "timer0.h" |
#include "uart1.h" |
#include "kml.h" |
//#include "gpx.h" |
#include "gpx.h" |
#include "ssc.h" |
#include "settings.h" |
#include "printf_P.h" |
115,7 → 115,7 |
} |
|
//---------------------------------------------------------------------------------------------------- |
/*int8_t* GenerateGPXLogFileName(void) |
int8_t* GenerateGPXLogFileName(void) |
{ |
static uint16_t filenum = 0; // file name counter |
static int8_t filename[35]; |
137,7 → 137,7 |
return filename; |
} |
else return NULL; |
}*/ |
} |
|
|
//---------------------------------------------------------------------------------------------------- |
149,7 → 149,7 |
static uint16_t logtimer = 0, flushtimer = 0; // the log update timer |
static KML_Document_t logfile; // the logfilehandle |
|
// initialize if LogDelay os zero |
// initialize if LogDelay is zero |
if(!LogDelay) |
{ |
switch(logfilestate) |
265,7 → 265,6 |
} |
|
//---------------------------------------------------------------------------------------------------- |
/* |
// logs gps and state info to a gpx file |
logfilestate_t Logging_GPX(uint16_t LogDelay) |
{ |
386,7 → 385,6 |
|
return logfilestate; |
} |
*/ |
|
//---------------------------------------------------------------------------------------------------- |
// initialize logging |
393,11 → 391,11 |
void Logging_Init(void) |
{ |
LogCfg.KML_Interval = 500; //default |
Settings_GetParamValue(PID_KML_LOGGING, (uint16_t*)&LogCfg.KML_Interval); // overwrite by settings value |
Logging_KML(0); // initialize |
//LogCfg.GPX_Interval = 1000; //default |
//Settings_GetParamValue(PID_GPX_LOGGING, (uint16_t*)&LogCfg.GPX_Interval); // overwrite by settings value |
//Logging_GPX(0); // initialize |
Settings_GetParamValue(PID_KML_LOGGING, &(LogCfg.KML_Interval)); // overwrite by settings value |
printf("\r\nKML Interval = %d", LogCfg.KML_Interval); |
LogCfg.GPX_Interval = 1000; //default |
Settings_GetParamValue(PID_GPX_LOGGING, &(LogCfg.GPX_Interval)); // overwrite by settings value |
Logging_GPX(0); // initialize |
} |
|
//---------------------------------------------------------------------------------------------------- |
415,7 → 413,7 |
logtimer = SetDelay(10); // faster makes no sense |
// call the logger handlers if no error has occured |
if(logstate != LOGFILE_ERROR) logstate = Logging_KML(LogCfg.KML_Interval); |
//if(logstate != LOGFILE_ERROR) logstate = Logging_GPX(LogCfg.GPX_Interval); |
if(logstate != LOGFILE_ERROR) logstate = Logging_GPX(LogCfg.GPX_Interval); |
|
// a logging error has occured |
if(logstate == LOGFILE_ERROR) |