From bf6d90db6996dd9d46693bdaf20b7d86159a3a51 Mon Sep 17 00:00:00 2001 From: Vincenzo Manzoni Date: Wed, 3 Nov 2021 00:31:39 +0100 Subject: [PATCH] _VOLT_RESOLUTION data type changed to float _VOLT_RESOLUTION can be either 5 or 3.3 V. However, 3.3 V cannot be stored properly in a byte data type and it requires a float data type. --- src/MQUnifiedsensor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MQUnifiedsensor.h b/src/MQUnifiedsensor.h index b530665..fbbb29a 100644 --- a/src/MQUnifiedsensor.h +++ b/src/MQUnifiedsensor.h @@ -48,7 +48,7 @@ class MQUnifiedsensor /************************Private vars************************************/ byte _pin; byte _firstFlag = false; - byte _VOLT_RESOLUTION = 5.0; // if 3.3v use 3.3 + float _VOLT_RESOLUTION = 5.0; // if 3.3v use 3.3 byte _RL = 10; //Value in KiloOhms byte _ADC_Bit_Resolution = 10; byte _regressionMethod = 1; // 1 -> Exponential || 2 -> Linear