From 9da78f6d6317abf6a9d780980a4189335b6e4327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ted=20Sj=C3=B6blom?= <36690474+TedSjoblom@users.noreply.github.com> Date: Wed, 7 Dec 2022 15:17:16 +0100 Subject: [PATCH] Update main.py --- main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.py b/main.py index 1a78f96..89f281c 100644 --- a/main.py +++ b/main.py @@ -46,6 +46,7 @@ if MQTT_TLS: mq.tls_set() mq.enable_logger(LOGGER) +LOGGER.info("Connecting to MQTT broker...") mq.connect(MQTT_BROKER_HOST, MQTT_BROKER_PORT) @@ -176,8 +177,5 @@ def rotate_points_azimuth(input_stream): pipe_heading = source_heading.latest() pipe_rotate = source.zip(pipe_heading).map(rotate_points_azimuth).map(to_brefv_raw).sink(to_mqtt) - LOGGER.info("Connecting to MQTT broker...") - mq.connect(MQTT_BROKER_HOST, MQTT_BROKER_PORT) - LOGGER.info("Setting up MQTT listener...") subscribe_to_mqtt()