diff --git a/firmware/src/data.c b/firmware/src/data.c index cd71b5f..9736da1 100644 --- a/firmware/src/data.c +++ b/firmware/src/data.c @@ -147,7 +147,9 @@ struct tracker_datapoint* collect_data(void) * ---- GPS UBX ---- */ /* wait for GPS, if it takes forever the watchdog will save us */ + kick_the_watchdog(); while (gps_update_time_pending() || gps_update_position_pending()); + kick_the_watchdog(); if (gps_get_error_state() != GPS_NOERROR) { /* Error updating GPS position */ diff --git a/firmware/src/gps_ubx.c b/firmware/src/gps_ubx.c index 2993939..098c311 100644 --- a/firmware/src/gps_ubx.c +++ b/firmware/src/gps_ubx.c @@ -670,6 +670,8 @@ void gps_init(void) kick_the_watchdog(); + for (int i = 0; i < 100*1000; i++) { kick_the_watchdog(); } + /* Set the platform model */ gps_set_platform_model();