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
70835247
Commit
70835247
authored
Jan 20, 2015
by
Theodor-Adrian Stana
Committed by
Theodor-Adrian Stana
Feb 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed GPS_OFF event and fixed an error related to turn-on-turn-off
parent
3ea39e9b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
26 deletions
+16
-26
event.h
sw/common/event.h
+0
-1
status_bar.c
sw/freewatch/src/apps/widgets/status_bar.c
+13
-14
gpsbkgnd_task.c
sw/freewatch/src/gpsbkgnd_task.c
+3
-11
No files found.
sw/common/event.h
View file @
70835247
...
...
@@ -39,7 +39,6 @@ enum event_type {
RTC_TICK
,
BATTERY_STATUS
,
GPS_TICK
,
GPS_OFF
,
GPS_TRACK_ON
,
GPS_TRACK_OFF
};
...
...
sw/freewatch/src/apps/widgets/status_bar.c
View file @
70835247
...
...
@@ -54,17 +54,21 @@ static void status_bar_event(struct ui_widget *w, const struct event *evt)
{
switch
(
evt
->
type
)
{
case
GPS_TICK
:
if
(
gps_fixed
())
{
memcpy
(
&
gps_ico
,
&
gps_receiving
,
sizeof
(
struct
rle_bitmap
));
}
else
{
gps_ico_blink
^=
1
;
if
(
gps_ico_blink
)
{
memcpy
(
&
gps_ico
,
&
gps_searching
,
sizeof
(
struct
rle_bitmap
));
if
(
setting_get
(
&
setting_gps_on
))
{
if
(
gps_fixed
())
{
memcpy
(
&
gps_ico
,
&
gps_receiving
,
sizeof
(
struct
rle_bitmap
));
}
else
{
memset
(
&
gps_ico
,
0
,
sizeof
(
struct
rle_bitmap
));
gps_ico_blink
^=
1
;
if
(
gps_ico_blink
)
{
memcpy
(
&
gps_ico
,
&
gps_searching
,
sizeof
(
struct
rle_bitmap
));
}
else
{
memset
(
&
gps_ico
,
0
,
sizeof
(
struct
rle_bitmap
));
}
}
}
else
{
memcpy
(
&
gps_ico
,
0
,
sizeof
(
struct
rle_bitmap
));
}
// if (setting_get(&setting_tracking))
// memset(&track_ico, &tracking, sizeof(struct rle_bitmap));
...
...
@@ -73,11 +77,6 @@ static void status_bar_event(struct ui_widget *w, const struct event *evt)
w
->
flags
|=
WF_DIRTY
;
break
;
case
GPS_OFF
:
memset
(
&
gps_ico
,
0
,
sizeof
(
struct
rle_bitmap
));
w
->
flags
|=
WF_DIRTY
;
break
;
// case GPS_TRACK_ON:
// w->flags |= WF_DIRTY;
// break;
...
...
sw/freewatch/src/gpsbkgnd_task.c
View file @
70835247
...
...
@@ -52,8 +52,6 @@ extern xSemaphoreHandle mutexSdCardAccess;
static
int
mutexours
=
0
;
static
int
firstrun
,
firstfix
;
static
int
gpson
,
pgpson
;
static
int
track
,
ptrack
;
static
FIL
f
;
static
FATFS
fatfs
;
...
...
@@ -90,22 +88,16 @@ static void gpsbkgnd_task(void *params)
{
(
void
)
params
;
struct
event
e
;
static
int
gpson
,
pgpson
;
static
int
track
,
ptrack
;
/* Previous and current state of GPS ON setting */
pgpson
=
gpson
;
gpson
=
setting_get
(
&
setting_gps_on
);
/* Pulse GPS ON_OFF pin if setting changed */
if
((
pgpson
!=
gpson
)
&&
!
firstrun
)
if
((
pgpson
!=
gpson
)
&&
!
firstrun
)
{
gps_on_off_pulse
();
if
(
!
gpson
)
{
/* Turn off status bar icon if GPS turns off */
if
(
pgpson
)
{
e
.
type
=
GPS_OFF
;
xQueueSendToBack
(
appQueue
,
(
void
*
)
&
e
,
0
);
}
return
;
}
/*
...
...
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