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.
This commit is contained in:
Beat Küng 2016-07-13 14:35:03 +02:00
parent eda2915f0b
commit 399d4ef833

View File

@ -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. */