/trunk/canbus.c |
---|
1,3 → 1,5 |
#include <stdio.h> |
#include <stdarg.h> |
#include <string.h> |
#include "91x_lib.h" |
#include "91x_can.h" |
223,7 → 225,7 |
Partner.NC_To_FC_Flags = 0; |
Partner.MagnetField = 0; |
Partner.GyroCompassCorrected = -1; |
sprintf(PartnerErrorMSG," --- \0"); |
sprintf(PartnerErrorMSG," --- "); |
} |
if(CanRxMessage[CAN_ID_VERSION].D.Byte[6] == 13) // dann ist der Testdummy angeschlossen -> nur zum Testen von EXT2 |
/trunk/logging.c |
---|
64,6 → 64,7 |
#include "settings.h" |
#include "led.h" |
#include "logging.h" |
#include "triggerlog.h" |
#define MIN_SD_INTERVAL_KML 200 |
#define MIN_SD_INTERVAL_GPX 200 |
/trunk/main.h |
---|
14,7 → 14,7 |
#define VERSION_MAJOR 2 |
#define VERSION_MINOR 13 |
#define VERSION_PATCH 3 |
#define VERSION_PATCH 4 |
// 0 = A |
// 1 = B |
// 2 = C |
/trunk/triggerlog.c |
---|
356,7 → 356,7 |
// if(rel_altitude < 0) rel_altitude = 0; // avoid negative altitudes in log |
i1 = rel_altitude/1000L; |
i2 = rel_altitude%1000L; |
sprintf(string,";%ld.%03ld",i1, abs(i2)); |
sprintf(string,";%ld.%03ld",i1, labs(i2)); |
fputs_(string, doc->file); |
// Altitude Baro |
sprintf(string,";%ld.%02d",TrigLogging.AltiBaro/100,abs(TrigLogging.AltiBaro%100)); |
474,7 → 474,7 |
//---------------------------------------------------------------------------------------------------- |
// logs the current gps position to a csv file |
logfilestate_t LoggingTrigger(u32 LogDelay) |
tlogfilestate_t LoggingTrigger(u32 LogDelay) |
{ |
static logfilestate_t logfilestate = LOGFILE_IDLE; // the current logfilestate |
static s8* logfilename = NULL; // the pointer to the logfilename |
/trunk/triggerlog.h |
---|
23,6 → 23,7 |
File_t *file; // filepointer to the file where the data should be saved. |
} TRIG_Document_t; |
typedef enum |
{ |
LOGFILE_IDLE, |
30,9 → 31,8 |
LOGFILE_CLOSED, |
LOGFILE_OPENED, |
LOGFILE_ERROR |
} logfilestate_t; |
} tlogfilestate_t; |
typedef struct |
{ |
s32 Longitude; |
52,7 → 52,7 |
} TrigLog_t; |
extern TrigLog_t TrigLogging; |
extern logfilestate_t LoggingTrigger(u32); |
extern tlogfilestate_t LoggingTrigger(u32); |
u8 TRIG_LoggGPSCoordinates(TRIG_Document_t *); // intializes the kml-document with standard filename and adds points to the file |
u8 TRIG_DocumentInit(TRIG_Document_t *); // Init the new kml-document |
u8 TRIG_DocumentOpen(s8 *, TRIG_Document_t *); // opens a new kml-document. a new file is created on the sd-memorycard |