From e1c65ae57339c349c429e79178342bae5de28776 Mon Sep 17 00:00:00 2001 From: LoQue90 <98092139+LoQue90@users.noreply.github.com> Date: Wed, 6 Dec 2023 13:25:37 +0100 Subject: [PATCH] mqtt reconnect fix --- src/rancilio-pid.cpp | 7 ++++--- src/userConfig_sample.h | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/rancilio-pid.cpp b/src/rancilio-pid.cpp index fc8cec2e..5d5a8a59 100644 --- a/src/rancilio-pid.cpp +++ b/src/rancilio-pid.cpp @@ -3,13 +3,13 @@ * * @brief Main sketch * - * @version 3.2.0 Master + * @version 3.3.0 Master */ // Firmware version #define FW_VERSION 3 -#define FW_SUBVERSION 2 -#define FW_HOTFIX 1 +#define FW_SUBVERSION 3 +#define FW_HOTFIX 0 #define FW_BRANCH "ESP8222-MASTER" @@ -791,6 +791,7 @@ void checkMQTT() { debugPrintf("Attempting MQTT reconnection: %i\n", MQTTReCnctCount); if (mqtt.connect(hostname, mqtt_username, mqtt_password, topic_will, 0, 0, "offline") == true) { + MQTTReCnctCount = 0; mqtt.subscribe(topic_set); debugPrintln("Subscribe to MQTT Topics"); } // Try to reconnect to the server; connect() is a blocking diff --git a/src/userConfig_sample.h b/src/userConfig_sample.h index b6dd76ac..d6d1ca4b 100644 --- a/src/userConfig_sample.h +++ b/src/userConfig_sample.h @@ -1,7 +1,7 @@ /** * @file userConfig_sample.h * @brief Values must be configured by the user - * @version 3.2.0 Master + * @version 3.3.0 Master * */ #ifndef _userConfig_H @@ -9,8 +9,8 @@ // firmware version (must match with definitions in the main source file) #define USR_FW_VERSION 3 -#define USR_FW_SUBVERSION 2 -#define USR_FW_HOTFIX 1 +#define USR_FW_SUBVERSION 3 +#define USR_FW_HOTFIX 0 #define USR_FW_BRANCH "ESP8222-MASTER" // List of supported machines