diff --git a/src/drivers/touchwheel.cpp b/src/drivers/touchwheel.cpp index 2e44adfd..59c2911e 100644 --- a/src/drivers/touchwheel.cpp +++ b/src/drivers/touchwheel.cpp @@ -78,8 +78,11 @@ uint8_t TouchWheel::ReadRegister(uint8_t reg) { .write_addr(kTouchWheelAddress, I2C_MASTER_READ) .read(&res, I2C_MASTER_NACK) .stop(); - transaction.Execute(); - return res; + if (transaction.Execute() == ESP_OK) { + return res; + } else { + return 0; + } } void TouchWheel::Update() {