1 #ifndef HONEYWELL_SSC_H 2 #define HONEYWELL_SSC_H 122 static float rawToPressure(uint16_t raw, uint16_t rawMin, uint16_t rawMax,
float pMin,
float pMax)
124 return float(raw - rawMin) * (pMax - pMin) / (rawMax - rawMin) + pMin;
128 return (
float(raw) * 0.097703957 - 50.0)+273.15;
136 uint8_t setError(uint8_t
error)
141 uint8_t commandReply(Stream& stream, uint8_t result)
143 stream.println(result);
146 template<
typename T> uint8_t commandReply(Stream& stream, uint8_t result,
const T& data)
148 stream.println(data);
bool isRunning() const
Definition: SSC.h:51
void setMinPressure(float p)
Definition: SSC.h:61
static float rawToTemperature(uint16_t raw)
Definition: SSC.h:126
uint16_t pressure_Raw() const
Definition: SSC.h:97
void setMaxRaw(uint16_t raw)
Definition: SSC.h:91
static float rawToPressure(uint16_t raw, uint16_t rawMin, uint16_t rawMax, float pMin, float pMax)
Definition: SSC.h:122
uint8_t error() const
Definition: SSC.h:42
float temperature() const
Definition: SSC.h:109
uint8_t address() const
Definition: SSC.h:33
uint8_t flags() const
Definition: SSC.h:46
float maxPressure() const
Definition: SSC.h:67
void setMaxPressure(float p)
Definition: SSC.h:71
float rawToPressure(uint16_t raw) const
Definition: SSC.h:118
uint8_t busno() const
Definition: SSC.h:37
uint16_t maxRaw() const
Definition: SSC.h:87
void setMinRaw(uint16_t raw)
Definition: SSC.h:81
uint8_t commandRequest(Stream &stream)
Definition: SSC.cpp:103
SSC(uint8_t address, uint8_t busno=10)
Definition: SSC.cpp:4
Error
Definition: SSC.h:14
float pressure() const
Definition: SSC.h:105
uint8_t update()
Definition: SSC.cpp:22
float minPressure() const
Definition: SSC.h:57
uint16_t temperature_Raw() const
Definition: SSC.h:101
uint16_t minRaw() const
Definition: SSC.h:77