[ubx] At startup Reset, set UBX, Reset again to cover both power on and already running cases

ubseds12
Richard Meadows 2015-12-19 23:40:00 +00:00
rodzic cbf0c13f53
commit 6f31e9f07b
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -299,7 +299,7 @@ void gps_cfg_rst(void)
(uint8_t*)&ubx_cfg_rst.payload,
sizeof(ubx_cfg_rst.payload));
for (int i = 0; i < 1000*100*2; i++);
for (int i = 0; i < 1000*100; i++);
}
@ -511,6 +511,11 @@ void gps_init(void)
kick_ext_watchdog();
/* Reset the GPS */
gps_cfg_rst();
kick_ext_watchdog();
/* Incoming ubx messages are handled in an irq */
usart_register_rx_callback(GPS_SERCOM, gps_rx_callback, GPS_SERCOM_INT_PRIO);