diff --git a/Desktop_Interface/isodriver.cpp b/Desktop_Interface/isodriver.cpp index 4200e6a8..1bd2d2f5 100644 --- a/Desktop_Interface/isodriver.cpp +++ b/Desktop_Interface/isodriver.cpp @@ -131,7 +131,15 @@ void isoDriver::timerTick(void){ { if (twoWireStateInvalid) twoWire->reset(); - twoWire->run(); + try + { + twoWire->run(); + } + catch(...) + { + qDebug() << "Resetting I2C"; + twoWire->reset(); + } invalidateTwoWireState = false; twoWireStateInvalid = false; }