diff --git a/Temperature.cpp b/Temperature.cpp index cfa6c23c13ed2697ecaa209d8924d7f7c956c9e9..b75d26455adec4f70f0c54b79fe5c84583099729 100644 --- a/Temperature.cpp +++ b/Temperature.cpp @@ -34,8 +34,8 @@ Temperature::Temperature(const char *name, _measuredTemperatureDeviation = 0.0; _pump = false; - analogReference(INTERNAL1V1); // EXTERNAL && INTERNAL2V56 && INTERNAL1V1 - pinMode(_OutputPin_SensorPower, OUTPUT); // setup temperature sensor input pin + analogReference(INTERNAL1V1); // EXTERNAL && INTERNAL2V56 && INTERNAL1V1 + pinMode(_OutputPin_SensorPower, OUTPUT); // setup temperature sensor input pin digitalWrite(_OutputPin_SensorPower, LOW); // initialize sensor on } @@ -177,7 +177,7 @@ float Temperature::GetMode(float new_array[]) { } float Temperature::getCurrentTemperature() { - return _measuredTemperature; // - 4.41; + return _measuredTemperature>0.0?_measuredTemperature:0.0; // - 4.41; } float Temperature::setPumpStatus( bool pump ) { diff --git a/Temperature.h b/Temperature.h index 8bb7fdddd688079ce88aab9830db6b20bd37be27..71377790a681ddc6466f01c74eca7bf4b1fcde1c 100644 --- a/Temperature.h +++ b/Temperature.h @@ -8,7 +8,7 @@ #include "Arduino.h" -#define DEBUG +//#define DEBUG #define CONSTANT_ADC_STEP_COUNT 1024.0