Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 435 → Rev 436

/FollowMe/trunk/gpx.c
105,7 → 105,7
retvalue = 1; // the document could be created on the drive.
doc->state = GPX_DOC_OPENED; // change document state to opened. At next a placemark has to be opened.
str = GPX_DOCUMENT_HEADER; // write the gpx-header to the document..
for(i= 0; i < sizeof(GPX_DOCUMENT_HEADER); i++)
for(i= 0; i < sizeof(GPX_DOCUMENT_HEADER)-1; i++)
{
c = (int8_t)pgm_read_byte(str++); // get byte from flash
fputc_(c, doc->file); // and write that to sd-card
150,7 → 150,7
if(doc->file != NULL)
{
str = GPX_DOCUMENT_FOOTER; // write the gpx-footer to the document.
for(i= 0; i < sizeof(GPX_DOCUMENT_FOOTER); i++)
for(i= 0; i < sizeof(GPX_DOCUMENT_FOOTER)-1; i++)
{
c = (int8_t)pgm_read_byte(str++); // get byte from flash
fputc_(c, doc->file); // and write that to sd-card
194,7 → 194,7
doc->state = GPX_DOC_TRACK_OPENED;
retvalue = 1;
str = GPX_TRACK_HEADER;
for(i= 0; i < sizeof(GPX_TRACK_HEADER); i++)
for(i= 0; i < sizeof(GPX_TRACK_HEADER)-1; i++)
{
c = (int8_t)pgm_read_byte(str++); // get byte from flash
fputc_(c, doc->file); // and write that to sd-card
227,7 → 227,7
{
doc->state = GPX_DOC_OPENED;
str = GPX_TRACK_FOOTER;
for(i= 0; i < sizeof(GPX_TRACK_FOOTER); i++)
for(i= 0; i < sizeof(GPX_TRACK_FOOTER)-1; i++)
{
c = (int8_t)pgm_read_byte(str++); // get byte from flash
fputc_(c, doc->file); // and write that to sd-card
261,7 → 261,7
{
doc->state = GPX_DOC_TRACKSEGMENT_OPENED;
str = GPX_TRACKSEGMENT_HEADER;
for(i = 0; i < sizeof(GPX_TRACKSEGMENT_HEADER); i++)
for(i = 0; i < sizeof(GPX_TRACKSEGMENT_HEADER)-1; i++)
{
c = (int8_t)pgm_read_byte(str++); // get byte from flash
fputc_(c, doc->file); // and write that to sd-card
296,7 → 296,7
{
doc->state = GPX_DOC_TRACK_OPENED;
str = GPX_TRACKSEGMENT_FOOTER;
for(i = 0; i < sizeof(GPX_TRACKSEGMENT_FOOTER); i++)
for(i = 0; i < sizeof(GPX_TRACKSEGMENT_FOOTER)-1; i++)
{
c = (int8_t)pgm_read_byte(str++); // get byte from flash
fputc_(c, doc->file); // and write that to sd-card
346,7 → 346,7
i16_1 = abs((int16_t)(GPSData.Position.Longitude/10000000L));
i16_2 = abs((int16_t)((GPSData.Position.Longitude%10000000L)/10000L));
i16_3 = abs((int16_t)(((GPSData.Position.Longitude%10000000L)%10000L)/10L));
sprintf(string, "<lon=\"%c%d.%.3d%.3d\" ",u8_1, i16_1, i16_2, i16_3);
sprintf(string, "lon=\"%c%d.%.3d%.3d\" >\r\n",u8_1, i16_1, i16_2, i16_3);
fputs_(string, doc->file);
 
// write <time> tag only at a resolution of one second