rename methods
This commit is contained in:
@ -11,9 +11,9 @@ class DeviceDht : public Device {
|
||||
pin = dhtPin;
|
||||
type = dhtType;
|
||||
}
|
||||
virtual void setup();
|
||||
virtual void homieRegister();
|
||||
virtual void loop();
|
||||
virtual void deviceSetup();
|
||||
virtual void deviceRegister();
|
||||
virtual void deviceLoop();
|
||||
private:
|
||||
byte pin;
|
||||
byte type;
|
||||
@ -27,12 +27,12 @@ class DeviceDht : public Device {
|
||||
HomieNode heatindexNode{"heatindex", "heatindex"};
|
||||
};
|
||||
|
||||
void DeviceDht::setup() {
|
||||
void DeviceDht::deviceSetup() {
|
||||
pinMode(pin, INPUT);
|
||||
dht.begin();
|
||||
}
|
||||
|
||||
void DeviceDht::homieRegister() {
|
||||
void DeviceDht::deviceRegister() {
|
||||
Homie.registerNode(humidityNode);
|
||||
Homie.registerNode(temperatureNode);
|
||||
Homie.registerNode(heatindexNode);
|
||||
@ -43,7 +43,7 @@ bool isEqual(float a, float b, float epsilon=0.001) {
|
||||
return fabs(a - b) <= epsilon * fabs(a);
|
||||
}
|
||||
|
||||
void DeviceDht::loop() {
|
||||
void DeviceDht::deviceLoop() {
|
||||
if (millis() - lastSentDHT >= INTERVAL_DHT * 1000UL || lastSentDHT == 0) {
|
||||
float previousHumidity = humidity;
|
||||
float previousTemperature = temperature;
|
||||
|
Reference in New Issue
Block a user