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
8554978d
Commit
8554978d
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
Added tracking icon when option is set
parent
70835247
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1858 additions
and
1845 deletions
+1858
-1845
bitmaps.c
sw/bitmaps/bitmaps.c
+1834
-1787
bitmaps.h
sw/bitmaps/bitmaps.h
+13
-33
tracking.bmp
sw/bitmaps/tracking.bmp
+0
-0
status_bar.c
sw/freewatch/src/apps/widgets/status_bar.c
+8
-14
gpsbkgnd_task.c
sw/freewatch/src/gpsbkgnd_task.c
+3
-11
No files found.
sw/bitmaps/bitmaps.c
View file @
8554978d
This diff is collapsed.
Click to expand it.
sw/bitmaps/bitmaps.h
View file @
8554978d
/*
* Copyright (C) 2014 Julian Lewis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/gpl-3.0-standalone.html
* or you may search the http://www.gnu.org website for the version 3 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef BITMAPS_H
#define BITMAPS_H
...
...
@@ -31,22 +10,23 @@ struct rle_bitmap
const
uint8_t
*
data
;
};
extern
const
struct
rle_bitmap
comp_circle
;
extern
const
struct
rle_bitmap
gps_disconnected
;
extern
const
struct
rle_bitmap
comp_circle3
;
extern
const
struct
rle_bitmap
date_icon
;
extern
const
struct
rle_bitmap
comp_ico
;
extern
const
struct
rle_bitmap
gps_receiving
;
extern
const
struct
rle_bitmap
settings_icon
;
extern
const
struct
rle_bitmap
comp_circle2
;
extern
const
struct
rle_bitmap
game_ico
;
extern
const
struct
rle_bitmap
tracking
;
extern
const
struct
rle_bitmap
comp_arrow
;
extern
const
struct
rle_bitmap
usb_ms_icon
;
extern
const
struct
rle_bitmap
battery
;
extern
const
struct
rle_bitmap
date_icon
;
extern
const
struct
rle_bitmap
battery_charging
;
extern
const
struct
rle_bitmap
comp_circle3
;
extern
const
struct
rle_bitmap
clock_icon
;
extern
const
struct
rle_bitmap
comp_arrow2
;
extern
const
struct
rle_bitmap
gps_disconnected
;
extern
const
struct
rle_bitmap
example_icon
;
extern
const
struct
rle_bitmap
battery_charging
;
extern
const
struct
rle_bitmap
comp_circle
;
extern
const
struct
rle_bitmap
gps_receiving
;
extern
const
struct
rle_bitmap
gps_searching
;
extern
const
struct
rle_bitmap
settings_icon
;
extern
const
struct
rle_bitmap
game_ico
;
extern
const
struct
rle_bitmap
comp_arrow2
;
extern
const
struct
rle_bitmap
comp_ico
;
extern
const
struct
rle_bitmap
usb_ms_icon
;
extern
const
struct
rle_bitmap
battery
;
#endif
/* BITMAPS_H */
sw/bitmaps/tracking.bmp
0 → 100644
View file @
8554978d
774 Bytes
sw/freewatch/src/apps/widgets/status_bar.c
View file @
8554978d
...
...
@@ -38,7 +38,7 @@
#include "../settings/settings.h"
static
const
unsigned
int
GPS_POS
=
0
;
static
const
unsigned
int
TRACK_POS
=
3
6
;
static
const
unsigned
int
TRACK_POS
=
1
6
;
static
const
unsigned
int
BATTERY_POS
=
111
;
static
const
unsigned
int
BATTERY_BARS
=
10
;
...
...
@@ -70,21 +70,15 @@ static void status_bar_event(struct ui_widget *w, const struct event *evt)
}
else
{
memcpy
(
&
gps_ico
,
0
,
sizeof
(
struct
rle_bitmap
));
}
// if (setting_get(&setting_tracking))
// memset(&track_ico, &tracking, sizeof(struct rle_bitmap));
// else
// memset(&track_ico, 0, sizeof(struct rle_bitmap));
if
(
setting_get
(
&
setting_tracking
))
memcpy
(
&
track_ico
,
&
tracking
,
sizeof
(
struct
rle_bitmap
));
else
memset
(
&
track_ico
,
0
,
sizeof
(
struct
rle_bitmap
));
w
->
flags
|=
WF_DIRTY
;
break
;
// case GPS_TRACK_ON:
// w->flags |= WF_DIRTY;
// break;
//
// case GPS_TRACK_OFF:
// memset(&track_ico, 0, sizeof(struct rle_bitmap));
// w->flags |= WF_DIRTY;
// break;
break
;
case
BATTERY_STATUS
:
if
(
abs
(
percentage
-
evt
->
data
.
battery
.
percentage
)
>
5
||
...
...
sw/freewatch/src/gpsbkgnd_task.c
View file @
8554978d
...
...
@@ -102,23 +102,15 @@ static void gpsbkgnd_task(void *params)
/*
* Tracking actions based on previous and current value of setting
* - ON to OFF -- take control of storage so we can store and inform other
* tasks that tracking has turned on
* - ON to OFF -- take control of storage so we can store
* - OFF to ON -- give control of storage so other tasks can store to it
* and inform other tasks that tracking has been turned off
*/
ptrack
=
track
;
track
=
setting_get
(
&
setting_tracking
);
if
(
track
)
{
if
(
!
ptrack
||
firstrun
)
{
take_storage
();
// e.type = GPS_TRACK_ON;
// xQueueSendToBack(appQueue, &e, 0);
}
if
((
track
)
&&
(
!
ptrack
||
firstrun
))
{
take_storage
();
}
else
if
(
ptrack
)
{
give_storage
();
// e.type = GPS_TRACK_OFF;
// xQueueSendToBack(appQueue, &e, 0);
}
/* Set time and track according to setting */
...
...
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