Commit 46fb09f2 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

gpsapp: Now displays UTC time from GPS

parent 29d47973
......@@ -163,7 +163,16 @@ C_SRC += \
../common/gfx/graphics.c \
../common/gfx/ui.c \
../common/gfx/font_helv11.c \
../common/gfx/font_helv17.c \
../common/gfx/font_helv17b.c \
../common/gfx/font_helv22b.c \
../common/gfx/font_helv29.c \
../common/gfx/font_helv38b.c \
../common/gfx/font_luct38.c \
../common/gfx/font_xm16x25b.c \
../common/gfx/font_xm4x5.c \
../common/gfx/font_xm4x6.c \
../common/gfx/font_xm5x8.c \
../common/udelay.c \
gpsapp.c
......
......@@ -57,12 +57,16 @@ static int i = 0;
static void gps_redraw(struct ui_widget *w)
{
char buf[4];
char buf[16];
struct gps_utc utc;
gps_get_utc(&utc);
i+=2;
gfx_clear(&w->dc, 0);
sprintf(buf, "%d", i);
gfx_text(&w->dc, &font_helv38b, 0, 0, buf, 1);
sprintf(buf, "%d:%d:%d", utc.hr,
utc.min,
utc.sec);
gfx_text(&w->dc, &font_helv17b, 0, 0, buf, 0);
}
static void gps_event(struct ui_widget *w, const struct event *evt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment