From 7881a1c58f459adda159808328a3c06bb88662b1 Mon Sep 17 00:00:00 2001 From: CAHEK7 Date: Fri, 26 Aug 2016 14:26:07 +0300 Subject: [PATCH] replace return value to 'unsigned long' since all the functions return that type, not 'int' (type size and signedness mismatch) --- BaseMQ.cpp | 2 +- BaseMQ.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;