From 88a90495b2ef98538c5eec522fce8298deea4555 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 4 Jul 2015 15:14:39 +1000 Subject: [PATCH] HAL_SITL: allow for more data before GPS pipe flush --- libraries/AP_HAL_SITL/sitl_gps.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_HAL_SITL/sitl_gps.cpp b/libraries/AP_HAL_SITL/sitl_gps.cpp index 7a8f51eb56..9f27012322 100644 --- a/libraries/AP_HAL_SITL/sitl_gps.cpp +++ b/libraries/AP_HAL_SITL/sitl_gps.cpp @@ -49,7 +49,7 @@ ssize_t SITL_State::gps_read(int fd, void *buf, size_t count) #ifdef FIONREAD // use FIONREAD to get exact value if possible int num_ready; - while (ioctl(fd, FIONREAD, &num_ready) == 0 && num_ready > 256) { + while (ioctl(fd, FIONREAD, &num_ready) == 0 && num_ready > 3000) { // the pipe is filling up - drain it uint8_t tmp[128]; if (read(fd, tmp, sizeof(tmp)) != sizeof(tmp)) {