From 803181b7a59707e66a2547a505abbfabd6be8747 Mon Sep 17 00:00:00 2001 From: Piotr Henryk Dabrowski <41565539+phd@users.noreply.github.com> Date: Sun, 14 Oct 2018 08:06:23 +0200 Subject: [PATCH] Fix #26: added missing returns for read(int pin, ...) and read2(int pin, ...) (#27) --- SimpleDHT.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SimpleDHT.cpp b/SimpleDHT.cpp index 3c718a7..d50b9eb 100644 --- a/SimpleDHT.cpp +++ b/SimpleDHT.cpp @@ -57,7 +57,7 @@ int SimpleDHT::read(byte* ptemperature, byte* phumidity, byte pdata[40]) { int SimpleDHT::read(int pin, byte* ptemperature, byte* phumidity, byte pdata[40]) { setPin(pin); - read(ptemperature, phumidity, pdata); + return read(ptemperature, phumidity, pdata); } void SimpleDHT::setPin(int pin) { @@ -185,7 +185,7 @@ int SimpleDHT11::read2(float* ptemperature, float* phumidity, byte pdata[40]) { int SimpleDHT11::read2(int pin, float* ptemperature, float* phumidity, byte pdata[40]) { setPin(pin); - read2(ptemperature, phumidity, pdata); + return read2(ptemperature, phumidity, pdata); } int SimpleDHT11::sample(byte data[40]) { @@ -294,7 +294,7 @@ int SimpleDHT22::read2(float* ptemperature, float* phumidity, byte pdata[40]) { int SimpleDHT22::read2(int pin, float* ptemperature, float* phumidity, byte pdata[40]) { setPin(pin); - read2(ptemperature, phumidity, pdata); + return read2(ptemperature, phumidity, pdata); } int SimpleDHT22::sample(byte data[40]) {