From 775ac7670eef7a745cc22b9f04ec5d9829ec9c61 Mon Sep 17 00:00:00 2001 From: Rob Tillaart Date: Thu, 17 Oct 2024 12:01:35 +0200 Subject: [PATCH] fix #82, minimal timeout 10 ms for RTOS --- ADS1X15.cpp | 1 + CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/ADS1X15.cpp b/ADS1X15.cpp index be77986..94e6378 100644 --- a/ADS1X15.cpp +++ b/ADS1X15.cpp @@ -461,6 +461,7 @@ int16_t ADS1X15::_readADC(uint16_t readmode) { if ( (millis() - start) > timeOut) { + _error = ADS1X15_ERROR_TIMEOUT; return ADS1X15_ERROR_TIMEOUT; } yield(); // wait for conversion; yield for ESP. diff --git a/CHANGELOG.md b/CHANGELOG.md index c541056..99785a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [0.5.1] - 2024-10-17 - fix #82, minimal timeout 10 ms for RTOS +- set error flag for TIMEOUT ## [0.5.0] - 2024-08-20 - Fix #80, setComparatorPolarity() and setComparatorLatch() inverting.