kopia lustrzana https://github.com/bristol-seds/pico-tracker
[ubx] At startup Reset, set UBX, Reset again to cover both power on and already running cases
rodzic
c70c0b1800
commit
9eb81330f8
|
@ -309,7 +309,7 @@ void gps_cfg_rst(void)
|
||||||
(uint8_t*)&ubx_cfg_rst.payload,
|
(uint8_t*)&ubx_cfg_rst.payload,
|
||||||
sizeof(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++);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -586,6 +586,11 @@ void gps_init(void)
|
||||||
/* We use ubx protocol */
|
/* We use ubx protocol */
|
||||||
gps_set_io_config(GPS_BAUD_RATE);
|
gps_set_io_config(GPS_BAUD_RATE);
|
||||||
|
|
||||||
|
/* Reset the GPS */
|
||||||
|
gps_cfg_rst();
|
||||||
|
|
||||||
|
kick_ext_watchdog();
|
||||||
|
|
||||||
/* Incoming ubx messages are handled in an irq */
|
/* Incoming ubx messages are handled in an irq */
|
||||||
usart_register_rx_callback(GPS_SERCOM, gps_rx_callback, GPS_SERCOM_INT_PRIO);
|
usart_register_rx_callback(GPS_SERCOM, gps_rx_callback, GPS_SERCOM_INT_PRIO);
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue