Browse Source

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.
sbg
Beat Küng 9 years ago
parent
commit
399d4ef833
  1. 2
      src/modules/sensors/sensors.cpp

2
src/modules/sensors/sensors.cpp

@ -2342,7 +2342,7 @@ Sensors::task_main() @@ -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. */

Loading…
Cancel
Save