use only seconds for time units, improve self test debug

This commit is contained in:
Your Name
2021-10-27 01:42:01 +02:00
parent e70e467e9b
commit 7d80d444cf
5 changed files with 44 additions and 27 deletions

View File

@@ -26,7 +26,7 @@ typedef struct PlantSettings_t
HomieSetting<long> *pPumpAllowedHourRangeStart;
HomieSetting<long> *pPumpAllowedHourRangeEnd;
HomieSetting<bool> *pPumpOnlyWhenLowLight;
HomieSetting<long> *pPumpCooldownInMinutes;
HomieSetting<long> *pPumpCooldownInSeconds;
HomieSetting<long> *pPumpDuration;
HomieSetting<long> *pPumpPowerLevel;
} PlantSettings_t;

View File

@@ -30,4 +30,5 @@
#define LOG_DEBUG_CODE 1001
#define LOG_SLEEP_NIGHT 100
#define LOG_SLEEP_DAY 101
#define LOG_SLEEP_CYCLE 102
#define LOG_MISSING_PUMP -4

View File

@@ -122,7 +122,7 @@ public:
void init(void);
long getCooldownInSeconds() {
return this->mSetting->pPumpCooldownInMinutes->get()*60;
return this->mSetting->pPumpCooldownInSeconds->get();
}
/**