From 9bf95fa5c90104cb6caa182514066bdb246cf665 Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Thu, 29 Aug 2019 17:19:27 -0400 Subject: [PATCH] Fixed signed/unsigned and unused parameter warnings --- DHT.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DHT.cpp b/DHT.cpp index 14e1d85..170aceb 100644 --- a/DHT.cpp +++ b/DHT.cpp @@ -37,7 +37,7 @@ * @param count * number of sensors */ -DHT::DHT(uint8_t pin, uint8_t type, uint8_t count) { +DHT::DHT(uint8_t pin, uint8_t type, uint8_t /*count*/) { _pin = pin; _type = type; #ifdef __AVR @@ -279,12 +279,12 @@ bool DHT::read(bool force) { // First expect a low signal for ~80 microseconds followed by a high signal // for ~80 microseconds again. - if (expectPulse(LOW) == TIMEOUT) { + if (expectPulse(LOW) == (uint32_t)TIMEOUT) { DEBUG_PRINTLN(F("DHT timeout waiting for start signal low pulse.")); _lastresult = false; return _lastresult; } - if (expectPulse(HIGH) == TIMEOUT) { + if (expectPulse(HIGH) == (uint32_t)TIMEOUT) { DEBUG_PRINTLN(F("DHT timeout waiting for start signal high pulse.")); _lastresult = false; return _lastresult; @@ -309,7 +309,7 @@ bool DHT::read(bool force) { for (int i = 0; i < 40; ++i) { uint32_t lowCycles = cycles[2 * i]; uint32_t highCycles = cycles[2 * i + 1]; - if ((lowCycles == TIMEOUT) || (highCycles == TIMEOUT)) { + if ((lowCycles == (uint32_t)TIMEOUT) || (highCycles == (uint32_t)TIMEOUT)) { DEBUG_PRINTLN(F("DHT timeout waiting for pulse.")); _lastresult = false; return _lastresult;