mirror of
https://github.com/SlimeVR/SlimeVR-Tracker-ESP.git
synced 2026-04-06 02:01:57 +02:00
add handling for not given pin (-1 or 255) (#406)
This commit fixes the use case BNO08x whit out a interrupt pin.
This commit is contained in:
@@ -94,6 +94,9 @@ void SensorManager::setup() {
|
||||
std::map<std::tuple<int, int, int, int>, I2CPCASensorInterface*> pcaWireInterfaces;
|
||||
|
||||
auto directPin = [&](int pin) {
|
||||
if (pin == 255 || pin == -1) {
|
||||
return static_cast<DirectPinInterface*>(nullptr);
|
||||
}
|
||||
if (!directPinInterfaces.contains(pin)) {
|
||||
auto ptr = new DirectPinInterface(pin);
|
||||
directPinInterfaces[pin] = ptr;
|
||||
|
||||
Reference in New Issue
Block a user