From ef446ebd197fa74da338da94f667d53b8c0d1fd3 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Mon, 27 Mar 2023 21:04:23 +0200 Subject: [PATCH] Teleinfo: pull data at every loop to avoid overflow in libteleinfo --- WifiControlSensor/WifiControlSensor.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WifiControlSensor/WifiControlSensor.ino b/WifiControlSensor/WifiControlSensor.ino index 794ce62..75e566e 100644 --- a/WifiControlSensor/WifiControlSensor.ino +++ b/WifiControlSensor/WifiControlSensor.ino @@ -311,6 +311,7 @@ void loop() { } delay(CONFIG_WEB_DELAY_MS); + TeleinfoRetrieve(teleIinst, telePapp, teleBase); nbCycle++; if (nbCycle > samplingPeriod / CONFIG_WEB_DELAY_MS) { std::vector batchInfo; @@ -365,7 +366,7 @@ void loop() { 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) MqttBatchPublish(batchInfo, conf.mqttUser, conf.host);