From feb598a991279b435f31c28852718d64ca23c2a3 Mon Sep 17 00:00:00 2001 From: fredlcore Date: Fri, 6 Dec 2024 19:09:02 +0800 Subject: [PATCH] Added more MQTT "housekeeping" --- BSB_LAN/BSB_LAN.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BSB_LAN/BSB_LAN.ino b/BSB_LAN/BSB_LAN.ino index 700276e3..b8f870f8 100644 --- a/BSB_LAN/BSB_LAN.ino +++ b/BSB_LAN/BSB_LAN.ino @@ -3873,6 +3873,10 @@ void query(float line) { // line (ProgNr) if (bus->getBusType() != BUS_PPS) { // bus type is not PPS retry=QUERY_RETRIES; while (retry) { + if (mqtt_broker_addr[0] && (LoggingMode & CF_LOGMODE_MQTT)) { // Do MQTT housekeeping here in case delays occur... + mqtt_connect(); //Luposoft, connect to mqtt + MQTTPubSubClient->loop(); //Luposoft: listen to incoming messages + } if (bus->Send(query_type, c, msg, tx_msg) == BUS_OK) { // Decode the xmit telegram and send it to the PC serial interface if (verbose) {