Skip to content

Commit

Permalink
Arduino Bootstrapper (v1.9.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
sblantipodi committed Aug 18, 2021
1 parent 4293c2c commit 2ee8c0e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "git",
"url": "https://github.com/sblantipodi/arduino_bootstrapper.git"
},
"version": "1.9.1",
"version": "1.9.2",
"examples": "examples/*.cpp",
"exclude": "tests",
"frameworks": "arduino",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Bootstrapper
version=1.9.1
version=1.9.2
author=Davide Perini <[email protected]>
maintainer=Davide Perini <[email protected]>
sentence=A client library for MQTT messaging.
Expand Down
8 changes: 7 additions & 1 deletion src/QueueManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ void QueueManager::mqttReconnect(void (*manageDisconnections)(), void (*manageQu
manageHardwareButton();

// Attempt to connect to MQTT server with QoS = 1 (pubsubclient supports QoS 1 for subscribe only, published msg have QoS 0 this is why I implemented a custom solution)
if (mqttClient.connect(helper.string2char(deviceName), helper.string2char(mqttuser), helper.string2char(mqttpass), 0, 1, 0, 0, 1)) {
boolean mqttSuccess;
if (mqttuser.isEmpty() || mqttpass.isEmpty()) {
mqttSuccess = mqttClient.connect(helper.string2char(deviceName), 0, 1, 0, 0);
} else {
mqttSuccess = mqttClient.connect(helper.string2char(deviceName), helper.string2char(mqttuser), helper.string2char(mqttpass), 0, 1, 0, 0, 1);
}
if (mqttSuccess) {

helper.smartPrintln(F(""));
helper.smartPrintln(F("CONNECTED"));
Expand Down

0 comments on commit 2ee8c0e

Please sign in to comment.