Refactoring

This commit is contained in:
Ollo 2023-06-20 18:06:29 +02:00
parent f65132652c
commit 9167da5a82
2 changed files with 3 additions and 3 deletions

View File

@ -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()));
} }
} }

View File

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