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
f49b2ff1
Commit
f49b2ff1
authored
Sep 18, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gpscoord: Testing
parent
5623f3ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
gpscoord.c
sw/freertos/src/apps/gpscoord.c
+8
-8
No files found.
sw/freertos/src/apps/gpscoord.c
View file @
f49b2ff1
...
...
@@ -65,26 +65,26 @@ static void gps_redraw(struct ui_widget *w)
/* Display latitude and longitude depending on format */
if
(
coord_format
==
0
)
{
/* raw [deg][min].[sec/60] */
sprintf
(
buf
,
"L: %d"
,
(
int
)
latdeg
);
sprintf
(
buf
,
"L: %d
deg
"
,
(
int
)
latdeg
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
0
,
0
,
buf
,
0
);
sprintf
(
buf
,
"%2.5f'"
,
latmin
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
20
,
20
,
buf
,
0
);
sprintf
(
buf
,
"l: %d"
,
(
int
)(
londeg
));
sprintf
(
buf
,
"l: %d
deg
"
,
(
int
)(
londeg
));
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
0
,
40
,
buf
,
0
);
sprintf
(
buf
,
"%2.5f'"
,
lonmin
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
15
,
60
,
buf
,
0
);
}
else
if
(
coord_format
==
1
)
{
/* [deg] [min] [sec] */
sprintf
(
buf
,
"L: %d"
,
(
int
)
latdeg
);
sprintf
(
buf
,
"L: %d
deg
"
,
(
int
)
latdeg
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
0
,
0
,
buf
,
0
);
sprintf
(
buf
,
"%d' %2.2f''"
,
(
int
)
latmin
,
0
.
6
*
latsec
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
20
,
20
,
buf
,
0
);
sprintf
(
buf
,
"l: %d"
,
(
int
)
londeg
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
0
,
0
,
buf
,
0
);
sprintf
(
buf
,
"l: %d
deg
"
,
(
int
)
londeg
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
0
,
4
0
,
buf
,
0
);
sprintf
(
buf
,
"%d' %2.2f''"
,
(
int
)
lonmin
,
60
*
lonsec
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
20
,
2
0
,
buf
,
0
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
15
,
6
0
,
buf
,
0
);
}
else
if
(
coord_format
==
2
)
{
/* [deg].[min/60] */
latdeg
=
latdeg
/
0
.
6
;
...
...
@@ -93,12 +93,12 @@ static void gps_redraw(struct ui_widget *w)
londeg
=
londeg
/
0
.
6
;
sprintf
(
buf
,
"l: %2.5f"
,
londeg
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
0
,
0
,
buf
,
0
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
0
,
4
0
,
buf
,
0
);
}
/* Display elevation */
sprintf
(
buf
,
"h: %5.2f"
,
coord
.
elev
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
0
,
80
,
buf
,
0
);
gfx_text
(
&
w
->
dc
,
&
font_helv22b
,
0
,
75
,
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