Skip to content

Commit

Permalink
mqtt reconnect fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LoQue90 authored and fiendie committed Dec 6, 2023
1 parent 9e027c9 commit 8496913
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/rancilio-pid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/userConfig_sample.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/**
* @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
#define _userConfig_H

// 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
Expand Down

0 comments on commit 8496913

Please sign in to comment.