Skip to content

Commit

Permalink
AP_HAL_AVR_SITL: allow for more data before GPS pipe flush
Browse files Browse the repository at this point in the history
Modification pulled from upstream. Could not cherry pick due to the SITL rename
  • Loading branch information
wsilva32 authored and jschall committed Oct 27, 2015
1 parent e0f8201 commit d570719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_HAL_AVR_SITL/sitl_gps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,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)) {
Expand Down

0 comments on commit d570719

Please sign in to comment.