From 7480f7c2e6b27a43e7a85929043662969438da0a Mon Sep 17 00:00:00 2001 From: pmantoine Date: Fri, 31 May 2024 22:18:25 +1000 Subject: [PATCH] Revert timeout calc --- I2CManager_NonBlocking.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/I2CManager_NonBlocking.h b/I2CManager_NonBlocking.h index 6315915..59bbcaf 100644 --- a/I2CManager_NonBlocking.h +++ b/I2CManager_NonBlocking.h @@ -1,6 +1,6 @@ /* * © 2023, Neil McKechnie - * © 2022-2024, Paul M Antoine + * © 2022 Paul M Antoine * All rights reserved. * * This file is part of CommandStation-EX @@ -245,8 +245,8 @@ void I2CManagerClass::checkForTimeout() { I2CRB *t = queueHead; if (state==I2C_STATE_ACTIVE && t!=0 && t==currentRequest && _timeout > 0) { // Check for timeout - uint32_t elapsed = micros() - startTime; - if (elapsed > _timeout) { + int32_t elapsed = micros() - startTime; + if (elapsed > (int32_t)_timeout) { #ifdef DIAG_IO //DIAG(F("I2CManager Timeout on %s"), t->i2cAddress.toString()); #endif