From 399d4ef833cd72ac059f794963e4e8a6d51ea65a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Wed, 13 Jul 2016 14:35:03 +0200 Subject: [PATCH] sensors: only poll on first gyro for now This fixes a bug with following setup: - two (or N > 1) connected gyros - ekf2 enabled In this case, sensors would publish with the combined rate of the gyros, but with N following messages having the same gyro data & timestamp. Apparently ekf2 cannot handle this, the other estimators can. We may want to rethink what the proper solution is here. --- src/modules/sensors/sensors.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/sensors/sensors.cpp b/src/modules/sensors/sensors.cpp index af852abffe..1d69e03cfd 100644 --- a/src/modules/sensors/sensors.cpp +++ b/src/modules/sensors/sensors.cpp @@ -2342,7 +2342,7 @@ Sensors::task_main() } /* wait for up to 50ms for data */ - int pret = px4_poll(fds, num_poll_fds, 50); + int pret = px4_poll(fds, 1, 50); /* if pret == 0 it timed out - periodic check for _task_should_exit, etc. */