Refactoring
This commit is contained in:
parent
f65132652c
commit
9167da5a82
@ -230,8 +230,8 @@ void Plant::activatePump(void)
|
||||
ledcWrite(this->mPlantId, desiredPowerLevelPercent * PWM_BITS);
|
||||
if (this->mConnected)
|
||||
{
|
||||
const String OFF = String("ON");
|
||||
this->mPlant->setProperty("switch").send(OFF);
|
||||
const String ON = String("ON");
|
||||
this->mPlant->setProperty("switch").send(ON);
|
||||
this->mPlant->setProperty("lastPump").send(String(getCurrentTime()));
|
||||
}
|
||||
}
|
||||
|
@ -704,7 +704,7 @@ void pumpActiveLoop()
|
||||
}
|
||||
|
||||
bool mqttUpdateTick = false;
|
||||
if (lastSendPumpUpdate + 1000 < millis())
|
||||
if (lastSendPumpUpdate + 3000 < millis())
|
||||
{
|
||||
lastSendPumpUpdate = millis();
|
||||
mqttUpdateTick = true;
|
||||
|
Loading…
Reference in New Issue
Block a user