/trunk/gpx.c |
---|
69,6 → 69,7 |
#include "timer2.h" |
#include "logging.h" |
#include "ncmag.h" |
#include "uart0.h" |
//________________________________________________________________________________________________________________________________________ |
// Function: GPX_DocumentInit(GPX_Document_t *) |
125,6 → 126,7 |
fputs_(string, doc->file); |
sprintf(string, "<extensions>\r\n"); fputs_(string, doc->file); |
sprintf(string, "<MK_Time>%imin</MK_Time>\r\n",FlugMinutenGesamt);fputs_(string, doc->file); |
sprintf(string, "<GpsVersion>%d.%03d</GpsVersion>\r\n",GPS_Version/1000,GPS_Version%1000);fputs_(string, doc->file); |
sprintf(string, "<License>\r\n"); fputs_(string, doc->file); |
if(tmp_license->User[0] != 0) |
{ |
142,7 → 144,7 |
sprintf(string, "<Number>%i</Number>\r\n",Parameter.ActiveSetting);fputs_(string, doc->file); |
sprintf(string, "<CompassOffset>%i</CompassOffset>\r\n",FC.FromFC_CompassOffset/10);fputs_(string, doc->file); |
sprintf(string, "<FCOrientation>%i</FCOrientation>\r\n",Parameter.OrientationAngle*15);fputs_(string, doc->file); |
sprintf(string, "<GeoMag>%i</GeoMag>\r\n",GeoMagDec/10);fputs_(string, doc->file); |
sprintf(string, "<GeoMag>%i.%1d</GeoMag>\r\n",GeoMagDec/10,GeoMagDec%10);fputs_(string, doc->file); |
sprintf(string, "<Neutral>%d,%d,%d</Neutral>\r\n", FC.AdNeutralNick,FC.AdNeutralRoll,FC.AdNeutralYaw);fputs_(string, doc->file); |
if((FC.StatusFlags3 & FC_STATUS3_BOAT)) {sprintf(string, "<BoatMode>On</BoatMode>\r\n");fputs_(string, doc->file);} |
if(Parameter.Driftkomp) {sprintf(string, "<DriftComp>%i</DriftComp>\r\n",Parameter.Driftkomp);fputs_(string, doc->file);}; |
577,8 → 579,8 |
} |
*/ |
// Navigation Update speed (in 0.1Hz) |
sprintf(string, "<NaviUpdate>%d,%d</NaviUpdate>\r\n",FreqGpsProcessedIn5Sec,FreqNewGpsDataIn5Sec); |
fputs_(string, doc->file); |
// sprintf(string, "<NaviUpdate>%d,%d</NaviUpdate>\r\n",FreqGpsProcessedIn5Sec,FreqNewGpsDataIn5Sec); |
// fputs_(string, doc->file); |
// eof extensions |
sprintf(string, "</extensions>\r\n"); |
fputs_(string, doc->file); |
/trunk/logging.c |
---|
317,7 → 317,7 |
static u32 logtimer = 0, flushtimer = 0, appendtimer = 0; // the log update timer |
static GPX_Document_t logfile; // the logfilehandle |
static u8 part = 0, logging_active = 0, old_errorcode = 0; |
u32 measure_time; |
// u32 measure_time; |
// initialize if LogDelay is zero |
if(!LogDelay) |
/trunk/main.h |
---|
14,7 → 14,7 |
#define VERSION_MAJOR 2 |
#define VERSION_MINOR 9 |
#define VERSION_PATCH 0 |
#define VERSION_PATCH 1 |
// 0 = A |
// 1 = B |
// 2 = C |
/trunk/uart0.c |
---|
92,6 → 92,7 |
u32 UART0_NaviData_Timer; |
u32 UART0_NaviData_Interval = 0; // in ms |
u16 GPS_Version = 0; |
//------------------------------------------------------------------------------------ |
// functions |
501,6 → 502,7 |
u8 UART0_GetUBXVersion(void) |
{ |
u32 timeout; |
u8 msg[64]; |
u8 retval = 0xFF; |
u8 ubxmsg[]={0x0A, 0x04, 0x00, 0x00}; //MON-VER |
// prepare rx msg filter |
519,14 → 521,67 |
}while(!CheckDelay(timeout)); |
if((UbxMsg.Hdr.Length >= 40) && (UbxMsg.Status == NEWDATA)) |
{ |
UbxMsg.Data[4] = 0; //Only the fisrt 4 chsracters |
UbxMsg.Data[39] = 0; |
/* |
UART1_PutString(" V"); |
UbxMsg.Data[4] = 0; //Only the first 4 characters |
UART1_PutString((u8*)&UbxMsg.Data); |
UART1_PutString(" HW:"); |
UbxMsg.Data[39] = 0; |
UART1_PutString((u8*)&UbxMsg.Data[30]); |
retval = UbxMsg.Data[0]-'0'; // major sw version |
*/ |
if(UbxMsg.Data[33] == '4' && UbxMsg.Data[37] == '1') // LEA-4 |
{ |
GPS_Version = 1000 + (UbxMsg.Data[0] - '0') * 100 + (UbxMsg.Data[2] - '0') * 10 + (UbxMsg.Data[3] - '0'); |
retval = 10; // MKGPS V1 |
} |
else |
if(UbxMsg.Data[33] == '4' && UbxMsg.Data[37] == '7') // LEA-6 |
{ |
GPS_Version = 2000 + (UbxMsg.Data[0] - '0') * 100 + (UbxMsg.Data[2] - '0') * 10 + (UbxMsg.Data[3] - '0'); |
retval = 20; // MKGPS V2 |
} |
else |
if(UbxMsg.Data[33] == '8' && UbxMsg.Data[37] == '0') // NEO-8 |
{ |
GPS_Version = 3000 + (UbxMsg.Data[0] - '0') * 100 + (UbxMsg.Data[2] - '0') * 10 + (UbxMsg.Data[3] - '0'); |
retval = 30; // MKGPS V3 |
} |
else |
UART1_PutString(" ! -> UNKNOWN <- ! "); |
// HW:00000040: Antaris |
// HW:00040001: Antaris-4 |
// HW:80040001: Antaris-4 |
// HW:00040005: u-blox 5 |
// HW:00040006: u-blox 6 |
// HW:00040007: u-blox 6 |
// HW:00070000: u-blox 7 |
// HW:00080000: u-blox M8 |
// MKGPS V1 -> 1500 -> LEA-4H-0-000 -> ubxsw == 5.00 HW:00040001 |
// MKGPS V2 -> 2602 -> LEA-6S-0-000 -> ubxsw == 6.02 HW:00040007 |
// MKGPS V2 -> 2703 -> LEA-6S-0-001 -> ubxsw == 7.03 HW:00040007 |
// MKGPS V3 -> 3201 -> NEO-M8Q-0-00 -> ubxsw == 2.00 HW:00080000 (Flash-oder ROM Variante) |
UbxMsg.Data[4] = 0; //Only the first 4 characters |
sprintf(msg, " V%d SW:%s", retval, (u8*)&UbxMsg.Data[0]); |
UART1_PutString(msg); |
} |
UbxMsg.Status = INVALID; |
return(retval); |
} |
/trunk/uart0.h |
---|
30,6 → 30,7 |
u8 UART0_GetMKOSDVersion(void); |
u8 UART0_GetUBXVersion(void); |
u8 UART0_UBXSendCFGMsg(u8* pData, u16 Len); |
extern u16 GPS_Version; |
#endif //__UART0_H |