Commit 2f48bc72 authored by João Lino's avatar João Lino

forced measured temperature to be above 0

parent 65ccbff5
......@@ -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 ) {
......
......@@ -8,7 +8,7 @@
#include "Arduino.h"
#define DEBUG
//#define DEBUG
#define CONSTANT_ADC_STEP_COUNT 1024.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment