47 : MAXVAL{maxVal}, MINVAL{minVal}, SIM_DELTA{abs(simDelta)},
48 _currentDelta{SIM_DELTA},
_value{initialValue} {};
71 virtual void read(
void) = 0;
98class KettleTempSensor :
public Sensor
101 static KettleTempSensor *_instance;
104 KettleTempSensor(
void)
105 :
Sensor{150.0, 160.0, 145.0, 0.9} {};
108 ~KettleTempSensor(
void) =
default;
119 _instance =
new KettleTempSensor();
136 void begin(
void)
override;
144 void read(
void)
override;
163 static ChillerTempSensor *_instance;
166 ChillerTempSensor(
void)
167 :
Sensor{40.0, 45.0, 35.0, 0.5} {};
170 ~ChillerTempSensor(
void) =
default;
181 _instance =
new ChillerTempSensor();
198 void begin(
void)
override;
206 void read(
void)
override;
225 static KettleVolSensor *_instance;
228 KettleVolSensor(
void)
229 :
Sensor{8.0, 9.0, 7.0, 0.2} {};
232 ~KettleVolSensor(
void) =
default;
243 _instance =
new KettleVolSensor();
260 void begin(
void)
override;
268 void read(
void)
override;
KettleTempSensor * kettleTemp
Pointer to the current, active menu used by the application.
Definition Sensor.cpp:34
ChillerTempSensor * chillerTemp
Pointer to the current, active menu used by the application.
Definition Sensor.cpp:56
KettleVolSensor * kettleVolume
Pointer to the current, active menu used by the application.
Definition Sensor.cpp:77
Manages the Chiller temperature probe.
Definition Sensor.h:161
void begin(void) override
Initializes the sensors used by this object. Not needed if only using simulated sensor values.
Definition Sensor.cpp:58
void read(void) override
Reads the sensor and updates the value stored within this object.
Definition Sensor.cpp:64
static ChillerTempSensor & getInstance(void)
Returns reference to the single instance of the ChillerTempSensor class.
Definition Sensor.h:178
Manages the Kettle temperature probe.
Definition Sensor.h:99
static KettleTempSensor & getInstance(void)
Returns reference to the single instance of the KettleTempSensor class.
Definition Sensor.h:116
void begin(void) override
Initializes the sensors used by this object. Not needed if only using simulated sensor values.
Definition Sensor.cpp:36
void read(void) override
Reads the sensor and updates the value stored within this object.
Definition Sensor.cpp:42
Manages the Kettle Volume sensor.
Definition Sensor.h:223
static KettleVolSensor & getInstance(void)
Returns reference to the single instance of the KettleVolSensor class.
Definition Sensor.h:240
void read(void) override
Reads the sensor and updates the value stored within this object.
Definition Sensor.cpp:85
void begin(void) override
Initializes the sensors used by this object. Not needed if only using simulated sensor values.
Definition Sensor.cpp:79
sensorVal_t _value
Most recent sensor reading.
Definition Sensor.h:36
~Sensor(void)=default
Destroy the Sensor object.
const sensorVal_t value(void) const
Returns the sensor value.
Definition Sensor.h:84
void simulate(void)
Simulates a new sensor value, storing the results in this object.
Definition Sensor.cpp:14
virtual void begin(void)=0
Initializes the sensors used by this object. Not needed if only using simulated sensor values.
virtual void read(void)=0
Reads the sensor and updates the value stored within this object.
Sensor(sensorVal_t initialValue, sensorVal_t maxVal, sensorVal_t minVal, sensorVal_t simDelta)
Protected constructor for Sensor.
Definition Sensor.h:46
float sensorVal_t
Type definition used by Sensor class.
Definition Sensor.h:26