aboutsummaryrefslogtreecommitdiff
path: root/apps/gps/ubx.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gps/ubx.c')
-rw-r--r--apps/gps/ubx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/gps/ubx.c b/apps/gps/ubx.c
index 50bf579a0..b9f8a28a0 100644
--- a/apps/gps/ubx.c
+++ b/apps/gps/ubx.c
@@ -880,6 +880,7 @@ void *ubx_watchdog_loop(void *args)
int *fd = arguments->fd_ptr;
bool *thread_should_exit = arguments->thread_should_exit_ptr;
+ ubx_config_state = UBX_CONFIG_STATE_PRT;
/* first try to configure the GPS anyway */
configure_gps_ubx(fd);
@@ -892,7 +893,7 @@ void *ubx_watchdog_loop(void *args)
bool once_ok = false;
int mavlink_fd = open(MAVLINK_LOG_DEVICE, 0);
- ubx_config_state = UBX_CONFIG_STATE_PRT;
+
//int err_skip_counter = 0;
while (!(*thread_should_exit)) {
@@ -940,7 +941,9 @@ void *ubx_watchdog_loop(void *args)
ubx_healthy = false;
ubx_success_count = 0;
}
+
/* trying to reconfigure the gps configuration */
+ ubx_config_state = UBX_CONFIG_STATE_PRT;
configure_gps_ubx(fd);
fflush(stdout);
sleep(1);