Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
AP_InertialSensor: count found backends correctly #12850
so that INS_ENABLE_MASK matches available sensors
Currently we count every sensor we probe for, even if the sensor does not exist on the board. This means that it's practically impossible to set INS_ENABLE_MASK correctly without consulting the code and the board configuration. It also doesn't match the docs (which are sensible).
This fixes by always probing for available sensors even if disabled by INS_ENABLE_MASK, but then not adding them to the list of backends.
@tridge how do we manage the saved calibration settings? It looks like that if I disable the first IMU the second IMU gets the calibration settings of the first and I have to re-calibrate. Seems perversely logical, but perhaps could be quite dangerous if people are using INS_ENABLE_MASK.