Open pastaq opened 4 months ago
This bug also occurs if you adjust the scale or sample frequency of the IMU as noted in the testing for #115 and is looking more like an issue with the hardware implementation on that specific motherboard. Affected models so far: AYANEO 2, 2S, Geek, Geek 1S
udev events are not triggered when the device is undocked. We should find a way to use udev-rs
to verify if the gyro has actually been removed, and if not, attempt to reopen the channel for some maximum number of attempts before killing the source device.
When un-docking the AYANEO 2S I noticed this error pop up.
This could possibly affect other devices. I will test more devices to find out. The AYANEO 2S has a BMI260 IMU that uses a BMI160 ACPI ID.
When an IIO device is removed we should remove it from the list of devices we have checked in our discovery loop so it can be rediscovered.