diff --git a/BaseMQ.cpp b/BaseMQ.cpp index 7a7f0c7..d289a1b 100644 --- a/BaseMQ.cpp +++ b/BaseMQ.cpp @@ -65,7 +65,7 @@ float BaseMQ::readRs() { return rs; } -int readScaled(float a, float b) { +unsigned long readScaled(float a, float b) { float ratio = readRatio(); return exp((log(ratio)-b)/a); } diff --git a/BaseMQ.h b/BaseMQ.h index d830d80..2093b18 100644 --- a/BaseMQ.h +++ b/BaseMQ.h @@ -31,7 +31,7 @@ protected: uint8_t _pin; uint8_t _pinHeater; float readRs(); - int readScaled(float a, float b); + unsigned long readScaled(float a, float b); float calculateResistance(int rawAdc); virtual float getRoInCleanAir() const = 0; virtual int getRL() const = 0;