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 upAP_InertialSensor: count found backends correctly #12850
Conversation
…MASK matches available sensors
This comment has been minimized.
This comment has been minimized.
we would need to be sure that probing on all sensors does not install a timer callback and does not allocate any memory |
This comment has been minimized.
This comment has been minimized.
@tridge I have checked all the drivers, they all register callbacks and allocate memory in the start() function which is only ever called after the backends have been detected. |
This comment has been minimized.
This comment has been minimized.
@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. |
This comment has been minimized.
This comment has been minimized.
We are going to close this in favour of detecting IMU's in the correct order on relevant boards |
andyp1per commentedNov 17, 2019
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.