From 971cc458aea21832a20b1b087185659d8e9ec2b3 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Feb 2019 23:00:23 +0000 Subject: fix offsets --- app/gps.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'app/gps.c') diff --git a/app/gps.c b/app/gps.c index 7e2fd1b..5fc9994 100644 --- a/app/gps.c +++ b/app/gps.c @@ -185,9 +185,16 @@ ubx_recv_utc (uint8_t *ptr, unsigned len) ptr += ubx_get_u8 (ptr, &min); ptr += ubx_get_u8 (ptr, &sec); - // printf ("gps %02d:%02d:%02d %09d\r\n", (int) hour, (int) min, (int) sec, (int) nano); + printf ("GPS META-DATA %04d-%02d-%02d %02d:%02d:%02d Fix:%c%c TXCO %+8dE-12\r\n", + year, + month, + day, + hour, + min, + sec, + fix, fix2, (int) freq); - { + if (gps_happy > 3) { UTC u; EPOCH gps_time; uint32_t now; @@ -425,12 +432,12 @@ ubx_dispatch_search (int s_class, int s_id, unsigned *len_ptr) } static void gps_pps_dispatch (void) { - char buf[80]; + //char buf[80]; uint32_t now; uint64_t abs; int v; EPOCH e; - UTC u; + //UTC u; if (gps_ring.rx_ptr == gps_ring.tx_ptr) return; @@ -451,15 +458,7 @@ static void gps_pps_dispatch (void) e = pll_decompose (abs); - u = time_epoch_to_utc (e); - - printf (" GPS %02d:%02d:%02d.%09d Fix:%c%c TXCO %+8dE-12\r\n", - u.hour, - u.minute, - u.second, - u.nanosecond, - fix, fix2, (int) freq); - + //u = time_epoch_to_utc (e); time_print_epoch ("GPS : ", e); } @@ -669,7 +668,7 @@ gps_init (void) { uint8_t buf[80], *ptr; unsigned len; - uint16_t u2; + // uint16_t u2; usart3_drain(); -- cgit v1.2.3