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
35205273
Commit
35205273
authored
Oct 04, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for GPS on in status bar handler
parent
21c04678
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
status_bar.c
sw/freertos/src/apps/widgets/status_bar.c
+15
-9
No files found.
sw/freertos/src/apps/widgets/status_bar.c
View file @
35205273
...
...
@@ -34,6 +34,8 @@
#include <drivers/gps.h>
#include "../settings/settings.h"
static
const
unsigned
int
BATTERY_POS
=
111
;
static
const
unsigned
int
BATTERY_BARS
=
10
;
...
...
@@ -47,6 +49,7 @@ static void status_bar_event(struct ui_widget *w, const struct event *evt)
{
switch
(
evt
->
type
)
{
case
RTC_TICK
:
if
(
setting_gps_on
.
val
)
{
if
(
gps_fixed
())
{
memcpy
(
&
gps_ico
,
&
gps_receiving
,
sizeof
(
struct
rle_bitmap
));
...
...
@@ -60,7 +63,10 @@ static void status_bar_event(struct ui_widget *w, const struct event *evt)
}
}
w
->
flags
|=
WF_DIRTY
;
break
;
}
// fall-through
case
BATTERY_STATUS
:
if
(
abs
(
percentage
-
evt
->
data
.
battery
.
percentage
)
>
5
||
charging
!=
evt
->
data
.
battery
.
charging
)
{
...
...
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