Fetch limit every 10 minutes
This commit is contained in:
parent
46367c4fa9
commit
b7961024a1
@ -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());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user