added initial support for hydroponic systems, changed cooldown to use minutes

This commit is contained in:
Empire
2021-10-22 17:39:42 +00:00
parent 0bcef25528
commit 49664ba6f7
7 changed files with 70 additions and 96 deletions

View File

@@ -46,9 +46,9 @@ void Plant::init(void)
return ((candidate >= 0) && (candidate <= 23));
});
this->mSetting->pPumpOnlyWhenLowLight->setDefaultValue(true);
this->mSetting->pPumpCooldownInHours->setDefaultValue(20); // minutes
this->mSetting->pPumpCooldownInHours->setValidator([](long candidate) {
return ((candidate >= 0) && (candidate <= 1024));
this->mSetting->pPumpCooldownInMinutes->setDefaultValue(20); // minutes
this->mSetting->pPumpCooldownInMinutes->setValidator([](long candidate) {
return ((candidate >= 0) && (candidate <= 60*24*7));
});
this->mSetting->pPumpDuration->setDefaultValue(5);