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
212d53d1
Commit
212d53d1
authored
Aug 29, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gpscoord: Printing all coordinates in one format on screen
parent
781e8744
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
16 deletions
+27
-16
Makefile
sw/freertos/Makefile
+18
-3
gpscoord.c
sw/freertos/src/apps/gpscoord.c
+9
-13
No files found.
sw/freertos/Makefile
View file @
212d53d1
...
...
@@ -119,7 +119,10 @@ INCLUDEPATHS += \
-I../common
\
-I../common/emlib/inc
\
-I../common/emdrv/sleep/inc
\
-I../common/drivers/gps/nmealib/include
-I../common/drivers/gps/nmealib/include
\
-I../common/drivers/usb/
\
-I../common/drivers/usb/inc
\
# TODO remove the USB stuff above
####################################################################
# Files #
...
...
@@ -138,7 +141,7 @@ C_SRC += \
../common/emlib/src/em_rtc.c
\
../common/emlib/src/em_system.c
\
../common/emlib/src/em_usart.c
\
../common/emlib/src/em_leuart.c
\
../common/emlib/src/em_leuart.c
\
../common/emdrv/sleep/src/sleep.c
\
../common/drivers/lcd.c
\
../common/drivers/buttons.c
\
...
...
@@ -185,7 +188,19 @@ src/low_power_tick_management.c \
../common/drivers/gps/nmealib/src/time.c
\
../common/drivers/gps/nmealib/src/tok.c
\
../common/drivers/gps/gps.c
\
src/apps/gpscoord.c
src/apps/gpscoord.c
\
../common/drivers/usb/usbdbg.c
\
../common/drivers/usb/src/em_usbd.c
\
../common/drivers/usb/src/em_usbdch9.c
\
../common/drivers/usb/src/em_usbdep.c
\
../common/drivers/usb/src/em_usbdint.c
\
../common/drivers/usb/src/em_usbh.c
\
../common/drivers/usb/src/em_usbhal.c
\
../common/drivers/usb/src/em_usbhep.c
\
../common/drivers/usb/src/em_usbhint.c
\
../common/drivers/usb/src/em_usbtimer.c
\
../common/drivers/emlib/src/em_timer.c
# TODO remove the USB stuff above
s_SRC
+=
...
...
sw/freertos/src/apps/gpscoord.c
View file @
212d53d1
...
...
@@ -36,26 +36,22 @@
#include "application.h"
static
int
i
=
0
;
static
struct
gps_coord
coord
;
static
void
gps_redraw
(
struct
ui_widget
*
w
)
{
char
buf
[
16
];
struct
gps_coord
c
;
gps_get_coord
(
&
c
);
if
(
gps_fixed
())
gps_get_coord
(
&
coord
);
gfx_clear
(
&
w
->
dc
,
0
);
sprintf
(
buf
,
"%2.4f"
,
c
.
lat
);
gfx_text
(
&
w
->
dc
,
&
font_helv17b
,
10
,
0
,
buf
,
0
);
i
++
;
sprintf
(
buf
,
"(%d)%d"
,
i
,
gps_fixed
());
gfx_text
(
&
w
->
dc
,
&
font_helv17b
,
10
,
50
,
buf
,
0
);
// sprintf(buf, "%2.4f", c.lon);
// gfx_text(&w->dc, &font_helv38b, 30, 0, buf, 0);
// sprintf(buf, "%2.4fm", c.elev);
// gfx_text(&w->dc, &font_helv38b, 50, 0, buf, 0);
sprintf
(
buf
,
"%4.4f"
,
coord
.
lat
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
10
,
10
,
buf
,
0
);
sprintf
(
buf
,
"%4.4f"
,
coord
.
lon
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
10
,
30
,
buf
,
0
);
sprintf
(
buf
,
"%5.0f m"
,
coord
.
elev
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
10
,
50
,
buf
,
0
);
}
static
void
gps_event
(
struct
ui_widget
*
w
,
const
struct
event
*
evt
)
...
...
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