![]() |
Meditech control panel software
1.0beta
application C++ firmware for control panel ChipKit PI board
|
#include "Temperature.h"
Public Member Functions | |
| Temperature () | |
| Temperature class constructor. More... | |
| void | CalcTemp (float sensor) |
| Convert the analog value to the respective value. More... | |
| float | Celsius () const |
| Return the last temperature read in Celsius deg. More... | |
| float | Fahrenheit () const |
| Return the last temperature read in Fahrenheit deg. More... | |
| float | Kelvin () const |
| Return the last temperature read in Kelvin deg. More... | |
| float | Rankine () const |
| Return the last temperature read in Rankine deg. More... | |
Private Attributes | |
| float | _Celsius |
| float | _Fahrenheit |
| float | _Kelvin |
| float | _Rankine |
| float | _sensorValue |
Definition at line 22 of file Temperature.h.
| Temperature::Temperature | ( | ) |
Temperature class constructor.
Set the analog pin for data reading
Definition at line 31 of file Temperature.cpp.
| void Temperature::CalcTemp | ( | float | sensor | ) |
Convert the analog value to the respective value.
As the call to the temperature reading is not a high priority task and does not need very high responsivity, when the analog data are read they are immediately converted to the three temperature scales: Celsius, Kelvin and Farehneit.
Definition at line 41 of file Temperature.cpp.
References _Celsius, _Fahrenheit, _Kelvin, _Rankine, _sensorValue, ABSOLUTE_ZERO_CELSIUS, and TEMP_OFFSET.
Referenced by setup(), and tempMonitor().
| float Temperature::Celsius | ( | ) | const |
Return the last temperature read in Celsius deg.
Definition at line 51 of file Temperature.cpp.
References _Celsius.
Referenced by showTemp().
| float Temperature::Fahrenheit | ( | ) | const |
Return the last temperature read in Fahrenheit deg.
Definition at line 56 of file Temperature.cpp.
References _Fahrenheit.
| float Temperature::Kelvin | ( | ) | const |
Return the last temperature read in Kelvin deg.
Definition at line 61 of file Temperature.cpp.
References _Kelvin.
| float Temperature::Rankine | ( | ) | const |
Return the last temperature read in Rankine deg.
Definition at line 66 of file Temperature.cpp.
References _Rankine.
|
private |
Definition at line 32 of file Temperature.h.
Referenced by CalcTemp(), and Celsius().
|
private |
Definition at line 33 of file Temperature.h.
Referenced by CalcTemp(), and Fahrenheit().
|
private |
Definition at line 34 of file Temperature.h.
Referenced by CalcTemp(), and Kelvin().
|
private |
Definition at line 35 of file Temperature.h.
Referenced by CalcTemp(), and Rankine().
|
private |
Definition at line 36 of file Temperature.h.
Referenced by CalcTemp().