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
10ac8402
Commit
10ac8402
authored
Oct 08, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed GPS tracking stuff, deferred for later
parent
ca8f1d76
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
78 deletions
+0
-78
menu_struct.c
sw/freertos/src/apps/menu_struct.c
+0
-1
settings.c
sw/freertos/src/apps/settings/settings.c
+0
-3
gpsbkgnd_task.c
sw/freertos/src/gpsbkgnd_task.c
+0
-74
No files found.
sw/freertos/src/apps/menu_struct.c
View file @
10ac8402
...
...
@@ -46,7 +46,6 @@ menu_list gps_settings_menu = {
{
SETTING
,
NULL
,
{
.
setting
=
&
setting_gps_sets_time
}
},
{
APP
,
&
clock_icon
,
{
.
app
=
&
set_gmt_ofs
}
},
{
APP
,
&
clock_icon
,
{
.
app
=
&
set_time_fr_gps
}
},
{
SETTING
,
NULL
,
{
.
setting
=
&
setting_tracking
}
},
{
END
,
NULL
,
{
NULL
}
}
}
};
...
...
sw/freertos/src/apps/settings/settings.c
View file @
10ac8402
...
...
@@ -60,7 +60,6 @@ void setting_init()
setting_gps_sets_time
.
fladdr
=
gps_sets_time
.
virtualAddress
;
setting_gmt_ofs_hr
.
fladdr
=
gmt_ofs_hr
.
virtualAddress
;
setting_gmt_ofs_min
.
fladdr
=
gmt_ofs_min
.
virtualAddress
;
setting_tracking
.
fladdr
=
tracking
.
virtualAddress
;
/*
* EE_Init() fails if the virtual addresses are not found in the flash. If
...
...
@@ -74,14 +73,12 @@ void setting_init()
EE_Write
(
&
gps_sets_time
,
setting_gps_sets_time
.
val
);
EE_Write
(
&
gmt_ofs_hr
,
setting_gmt_ofs_hr
.
val
);
EE_Write
(
&
gmt_ofs_min
,
setting_gmt_ofs_min
.
val
);
EE_Write
(
&
tracking
,
setting_tracking
.
val
);
}
else
{
EE_Read
(
&
gps_on
,
&
setting_gps_on
.
val
);
EE_Read
(
&
coord_style
,
&
setting_coord_style
.
val
);
EE_Read
(
&
gps_sets_time
,
&
setting_gps_sets_time
.
val
);
EE_Read
(
&
gmt_ofs_hr
,
&
setting_gmt_ofs_hr
.
val
);
EE_Read
(
&
gmt_ofs_min
,
&
setting_gmt_ofs_min
.
val
);
EE_Read
(
&
tracking
,
&
setting_tracking
.
val
);
}
}
...
...
sw/freertos/src/gpsbkgnd_task.c
View file @
10ac8402
...
...
@@ -38,10 +38,6 @@
#include "application.h"
#include "clock.h"
#include <ff.h>
#include <microsd.h>
#include <diskio.h>
#include <stdio.h>
#include <string.h>
...
...
@@ -53,16 +49,6 @@ extern xSemaphoreHandle mutexSdCardAccess;
static
int
firstrun
,
firstfix
;
static
int
gpson
,
pgpson
;
static
int
track
,
ptrack
;
static
int
open
=
0
;
static
int
mutexours
=
0
;
static
FIL
f
;
static
FATFS
fatfs
;
DWORD
get_fattime
(
void
)
{
return
(
28
<<
25
)
|
(
2
<<
21
)
|
(
1
<<
16
);
}
static
void
gpsbkgnd_task
(
void
*
params
)
{
...
...
@@ -70,10 +56,6 @@ static void gpsbkgnd_task(void *params)
struct
event
e
;
struct
tm
time
;
struct
gps_utc
gpstime
;
struct
gps_coord
gpscoord
;
char
buf
[
80
];
char
fname
[
64
];
UINT
dummy
;
/* Previous and current state of GPS ON setting */
pgpson
=
gpson
;
...
...
@@ -114,62 +96,6 @@ static void gpsbkgnd_task(void *params)
if
(
firstfix
)
firstfix
=
0
;
}
/* Track GPS position if setting tells us to */
ptrack
=
track
;
track
=
setting_get
(
&
setting_tracking
);
if
(
track
)
{
/*
* On first run or tracking setting change, init stuff & take semaphore
* so that only we write to SD; also retry getting the mutex if we
* couldn't on the previous run.
*/
if
(
firstrun
||
!
ptrack
||
!
mutexours
)
{
if
(
xSemaphoreTake
(
mutexSdCardAccess
,
0
))
{
mutexours
=
1
;
MICROSD_Init
();
disk_initialize
(
0
);
f_mount
(
0
,
&
fatfs
);
open
=
1
;
}
}
/* Write to file if gps is fixed and mutex tells us we can write to SD */
if
(
gps_fixed
()
&&
mutexours
)
{
if
(
open
)
{
/*
* We open the file here so that we can give it a name according
* to current time
*/
gps_get_utc
(
&
gpstime
);
sprintf
(
fname
,
"track_%d-%02d-%02d_%02dh%02dm%02ds.txt"
,
1900
+
gpstime
.
yr
,
1
+
gpstime
.
mon
,
gpstime
.
day
,
gpstime
.
hr
+
setting_get
(
&
setting_gmt_ofs_hr
),
gpstime
.
min
+
setting_get
(
&
setting_gmt_ofs_min
),
gpstime
.
sec
);
open
=
f_open
(
&
f
,
fname
,
FA_CREATE_ALWAYS
|
FA_WRITE
);
}
else
{
/*
* When we've opened (f_open() returns 0 on success), start
* putting coords into file
*/
gps_get_coord
(
&
gpscoord
,
2
);
sprintf
(
buf
,
"%3.7f,%3.7f
\n
"
,
gpscoord
.
lat
,
gpscoord
.
lon
);
f_write
(
&
f
,
buf
,
strlen
(
buf
),
&
dummy
);
}
}
}
else
if
(
!
track
&&
ptrack
)
{
/*
* Turned off tracking setting => close file, deinit microsd driver and
* give mutex so that other tasks can use the SD card
*/
f_close
(
&
f
);
MICROSD_Deinit
();
mutexours
=
0
;
xSemaphoreGive
(
mutexSdCardAccess
);
}
if
(
firstrun
)
firstrun
=
0
;
...
...
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