update esp mqtt library
This commit is contained in:
@@ -35,11 +35,13 @@ void connectToMqtt() {
|
||||
}
|
||||
|
||||
void onWiFiConnect(const WiFiEventStationModeGotIP& event) {
|
||||
(void) event;
|
||||
Serial.println("Connected to Wi-Fi.");
|
||||
connectToMqtt();
|
||||
}
|
||||
|
||||
void onWiFiDisconnect(const WiFiEventStationModeDisconnected& event) {
|
||||
(void) event;
|
||||
Serial.println("Disconnected from Wi-Fi.");
|
||||
}
|
||||
|
||||
@@ -86,6 +88,7 @@ void onMqttUnsubscribe(uint16_t packetId) {
|
||||
}
|
||||
|
||||
void onMqttMessage(const espMqttClientTypes::MessageProperties& properties, const char* topic, const uint8_t* payload, size_t len, size_t index, size_t total) {
|
||||
(void) payload;
|
||||
Serial.println("Publish received.");
|
||||
Serial.print(" topic: ");
|
||||
Serial.println(topic);
|
||||
|
||||
Reference in New Issue
Block a user