Teleinfo: pull data at every loop
to avoid overflow in libteleinfo
This commit is contained in:
parent
5987bc28de
commit
ef446ebd19
@ -311,6 +311,7 @@ void loop() {
|
|||||||
}
|
}
|
||||||
delay(CONFIG_WEB_DELAY_MS);
|
delay(CONFIG_WEB_DELAY_MS);
|
||||||
|
|
||||||
|
TeleinfoRetrieve(teleIinst, telePapp, teleBase);
|
||||||
nbCycle++;
|
nbCycle++;
|
||||||
if (nbCycle > samplingPeriod / CONFIG_WEB_DELAY_MS) {
|
if (nbCycle > samplingPeriod / CONFIG_WEB_DELAY_MS) {
|
||||||
std::vector<struct mqttInfo> batchInfo;
|
std::vector<struct mqttInfo> batchInfo;
|
||||||
@ -365,7 +366,7 @@ void loop() {
|
|||||||
batchInfo.push_back({bme680BSECIaqAcc, BME680_IAQ_ACC_FEED_FORMAT, 0, 0});
|
batchInfo.push_back({bme680BSECIaqAcc, BME680_IAQ_ACC_FEED_FORMAT, 0, 0});
|
||||||
}
|
}
|
||||||
|
|
||||||
TeleinfoProcess(teleIinst, telePapp, teleBase, batchInfo);
|
TeleinfoRetrieve(teleIinst, telePapp, teleBase, batchInfo);
|
||||||
|
|
||||||
if (mode == BOOTMODE_NORMAL)
|
if (mode == BOOTMODE_NORMAL)
|
||||||
MqttBatchPublish(batchInfo, conf.mqttUser, conf.host);
|
MqttBatchPublish(batchInfo, conf.mqttUser, conf.host);
|
||||||
|
Loading…
Reference in New Issue
Block a user