Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
fwatch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
fwatch
Commits
87a0e9ca
Commit
87a0e9ca
authored
Oct 07, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented GPS tracking
parent
ee006822
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
gpsbkgnd_task.c
sw/freertos/src/gpsbkgnd_task.c
+6
-2
No files found.
sw/freertos/src/gpsbkgnd_task.c
View file @
87a0e9ca
...
...
@@ -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
.
lat
,
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
*/
f_close
(
&
f
);
MICROSD_Deinit
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment