summaryrefslogtreecommitdiffstats
path: root/app/gps.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/gps.c')
-rw-r--r--app/gps.c27
1 files changed, 13 insertions, 14 deletions
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();