Skip to content

Commit f9307d1

Browse files
authored
Update net_mqtt.h
1 parent 478f359 commit f9307d1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bbn_m5tough_active_boat/net_mqtt.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,16 @@ extern "C" {
4848

4949
void victron_mqtt_client_connect(MQTTClient& client) {
5050
client.onMessage(victron_mqtt_on_message);
51-
client.setKeepAlive(10);
5251
while (!client.connect("arduino" /*clientID*/, "" /*user*/, "" /*password*/)) {
53-
M5.Lcd.print(".");
5452
delay(1000);
5553
}
56-
M5.Lcd.println("\nMQTT connected!");
54+
M5.Lcd.println("Connected to mqtt");
5755

5856
client.subscribe("N/+/+/#");
5957
}
6058

6159
void victron_mqtt_client_begin(MQTTClient& client, WiFiClient& net, const char* host, int port) {
60+
client.setKeepAlive(10);
6261
setKeepAlive(net);
6362
client.begin(host, port, net);
6463
victron_mqtt_client_connect(client);

0 commit comments

Comments
 (0)