diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-21 23:08:25 -0800 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-21 23:08:25 -0800 |
commit | cc74874d7ed2f94a030a97b52c91d684f1d4cfa4 (patch) | |
tree | 28b4dfdc0d7aa874a455973df82b68c67ac12f0c | |
parent | 48e497e4069a2f8773d90f2d1887967a81e487d8 (diff) | |
parent | f14c90c2220fffc51bc6e6e89bac6f9e726ff505 (diff) | |
download | px4-firmware-cc74874d7ed2f94a030a97b52c91d684f1d4cfa4.tar.gz px4-firmware-cc74874d7ed2f94a030a97b52c91d684f1d4cfa4.tar.bz2 px4-firmware-cc74874d7ed2f94a030a97b52c91d684f1d4cfa4.zip |
Merge pull request #180 from julianoes/hotfix_gps_ubx
Some timeout needed to be raised for now to make ubx with baudrate 9600 working again
-rw-r--r-- | apps/gps/ubx.c | 5 | ||||
-rw-r--r-- | apps/gps/ubx.h | 4 |
2 files changed, 6 insertions, 3 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); diff --git a/apps/gps/ubx.h b/apps/gps/ubx.h index e700fe388..f3313a3c6 100644 --- a/apps/gps/ubx.h +++ b/apps/gps/ubx.h @@ -51,9 +51,9 @@ //internal definitions (not depending on the ubx protocol #define UBX_NO_OF_MESSAGES 7 /**< Read 7 UBX GPS messages */ #define UBX_WATCHDOG_CRITICAL_TIME_MICROSECONDS 3000000 /**< Allow 3 seconds maximum inter-message time */ -#define UBX_WATCHDOG_WAIT_TIME_MICROSECONDS 1000000 /**< Check for current state every second */ +#define UBX_WATCHDOG_WAIT_TIME_MICROSECONDS 2000000 /**< Check for current state every two seconds */ -#define UBX_CONFIG_TIMEOUT 500000 +#define UBX_CONFIG_TIMEOUT 1000000 #define APPNAME "gps: ubx" |