rc-gateway/libraries/Tiny/GenericSensor.h
2022-10-06 09:09:39 +02:00

21 lines
376 B
C++

#pragma once
#include <TinySensor.h>
class GenericSensor : public TinySensor {
SensorType sensorType = GENERIC;
public:
GenericSensor(short id) :
TinySensor(id) {
}
void sendValueAndVoltage(int value) {
sendInfo(ID(id) | VCC(readVcc()) | VALUE(value) | TYPE(sensorType));
}
void sendValue(int value) {
sendInfo(ID(id) | TEMP(value) | TYPE(sensorType));
}
};