diff options
author | root <root@lab.panaceas.james.local> | 2019-02-19 23:00:23 +0000 |
---|---|---|
committer | root <root@lab.panaceas.james.local> | 2019-02-19 23:00:23 +0000 |
commit | 971cc458aea21832a20b1b087185659d8e9ec2b3 (patch) | |
tree | f0cf4843a1b71c5860392c17ccc86a963d53b4e3 /app/gps.c | |
parent | 379b0ec3e5eacdde822966c84062bea41da7ae89 (diff) | |
download | clock-971cc458aea21832a20b1b087185659d8e9ec2b3.tar.gz clock-971cc458aea21832a20b1b087185659d8e9ec2b3.tar.bz2 clock-971cc458aea21832a20b1b087185659d8e9ec2b3.zip |
fix offsets
Diffstat (limited to 'app/gps.c')
-rw-r--r-- | app/gps.c | 27 |
1 files changed, 13 insertions, 14 deletions
@@ -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(); |