Fetch limit every 10 minutes

This commit is contained in:
Thomas Basler 2022-09-09 18:50:37 +02:00
parent 46367c4fa9
commit b7961024a1
2 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,7 @@ void HoymilesClass::loop()
iv->sendAlarmLogRequest(_radio.get()); iv->sendAlarmLogRequest(_radio.get());
// Fetch limit // Fetch limit
if (iv->SystemConfigPara()->getLastUpdate() == 0) { if ((iv->SystemConfigPara()->getLastUpdate() == 0) || (millis() - iv->SystemConfigPara()->getLastUpdate() > HOY_SYSTEM_CONFIG_PARA_POLL_INTERVAL)) {
Serial.println("Request SystemConfigPara"); Serial.println("Request SystemConfigPara");
iv->sendSystemConfigParaRequest(_radio.get()); iv->sendSystemConfigParaRequest(_radio.get());
} }

View File

@ -7,6 +7,8 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#define HOY_SYSTEM_CONFIG_PARA_POLL_INTERVAL (10 * 60 * 1000) // 10 minutes
class HoymilesClass { class HoymilesClass {
public: public:
void init(); void init();