Quick question about second IMU
StarlightIbuki opened this issue · 1 comments
I don't find an answer in the documentation.
- What is the purpose to support a second IMU? To drive 2 trackers with 1 wifi chip or to minimize error? From what I see in the code it seems to be no.1.
- I skimmed the code, it seems if we do not have a second IMU, it will consider the first IMU "the second IMU".
In that case, the logic for the first IMU will be run 2 times for every event, which reports the same data twice. This does not seem correct.(It seems the difference is made by the INT pins?)
1: To drive 2 trackers with 1 WiFi chip, like put WiFi+IMU on the ankle, and aux IMU on feet. Aux tracker will be smaller than WiFi+IMU.
2: During setup, if there's only one IMU connected, the second one will be recreated as ErroneousSensor
instead of the actual sensor type, which does nothing during the motion loop, so fusion and reports are only from the valid sensor. The part you're referencing is probably the address selection logic, where if only one sensor is connected, it will be assigned to sensor1 regardless of its address. When two sensors are both present, address pick would return from the first given address, thus sensor1 will be the main and sensor2 will be the aux if connected as the wiki page shows.