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