Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/lib/drivers/magnetometer/PX4Magnetometer.cpp: Workaround for sens…
…ors not initializing with all the magnetometers There is some issue with "sensors" module; it only takes into account the magnetometers which have published data before the module start. Workaround this issue by publishing some initial "0" data right at the time of constructing the magnetometer driver. If the probing of the sensor fails, the orb gets anyhow unadvertised, so there is no extra sensor data lying around in the case the magnetometer is not present. This also forces the magnetometer numbering to follow the startup order; without advertising the data the orb numbering depends on magnetometer initialization sequence - a magnetometer started later in the init scripts may publish it's first data before some other mag, which was started earlier. This is especially problematic when using the same scripts on different HW platforms which run on different speeds. Signed-off-by: Jukka Laitinen <[email protected]>
- Loading branch information