Commit 87a0e9ca authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

Implemented GPS tracking

parent ee006822
......@@ -68,6 +68,8 @@ static void gpsbkgnd_task(void *params)
struct event e;
struct tm time;
struct gps_utc gpstime;
struct gps_coord gpscoord;
char buf[80];
/* Previous and current state of settings */
pgpson = cgpson;
......@@ -125,13 +127,15 @@ static void gpsbkgnd_task(void *params)
/* Write to file if gps is fixed */
if (gps_fixed()) {
f_printf(&f, "%d\n", gps_fixed());
gps_get_coord(&gpscoord, 2);
sprintf(buf, "%3.7f,%3.7f\n",, gpscoord.lon);
f_write(&f, buf, strlen(buf), NULL);
} else if (!ctrack && ptrack) {
* Turned off tracking setting => close file, deinit microsd driver and
* give mutex so that the USB mass storage device can take it
* give mutex so that other tasks can use the SD card
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment