rename methods

This commit is contained in:
2016-04-11 00:29:05 +02:00
parent aed5ff152b
commit c145154f3b
5 changed files with 24 additions and 24 deletions

View File

@ -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;