Skip to content

Commit

Permalink
update to core 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bertmelis authored May 29, 2024
1 parent f29e5e5 commit 0de9711
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions examples/notask-esp32/notask-esp32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ void connectToMqtt() {
void WiFiEvent(WiFiEvent_t event) {
Serial.printf("[WiFi-event] event: %d\n", event);
switch(event) {
case SYSTEM_EVENT_STA_GOT_IP:
case ARDUINO_EVENT_WIFI_STA_GOT_IP:
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
connectToMqtt();
break;
case SYSTEM_EVENT_STA_DISCONNECTED:
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
Serial.println("WiFi lost connection");
break;
default:
Expand Down Expand Up @@ -117,7 +117,7 @@ void setup() {
Serial.println();
Serial.println();

WiFi.setAutoConnect(false);
WiFi.persistent(false);
WiFi.setAutoReconnect(true);
WiFi.onEvent(WiFiEvent);

Expand Down
6 changes: 3 additions & 3 deletions examples/simple-esp32-idf/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ void connectToMqtt() {
void WiFiEvent(WiFiEvent_t event) {
Serial.printf("[WiFi-event] event: %d\n", event);
switch(event) {
case SYSTEM_EVENT_STA_GOT_IP:
case ARDUINO_EVENT_WIFI_STA_GOT_IP:
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
connectToMqtt();
break;
case SYSTEM_EVENT_STA_DISCONNECTED:
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
Serial.println("WiFi lost connection");
break;
default:
Expand Down Expand Up @@ -118,7 +118,7 @@ void setup() {
Serial.println();
Serial.println();

WiFi.setAutoConnect(false);
WiFi.persistent(false);
WiFi.setAutoReconnect(true);
WiFi.onEvent(WiFiEvent);

Expand Down
6 changes: 3 additions & 3 deletions examples/simple-esp32/simple-esp32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ void connectToMqtt() {
void WiFiEvent(WiFiEvent_t event) {
Serial.printf("[WiFi-event] event: %d\n", event);
switch(event) {
case SYSTEM_EVENT_STA_GOT_IP:
case ARDUINO_EVENT_WIFI_STA_GOT_IP:
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
connectToMqtt();
break;
case SYSTEM_EVENT_STA_DISCONNECTED:
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
Serial.println("WiFi lost connection");
break;
default:
Expand Down Expand Up @@ -117,7 +117,7 @@ void setup() {
Serial.println();
Serial.println();

WiFi.setAutoConnect(false);
WiFi.persistent(false);
WiFi.setAutoReconnect(true);
WiFi.onEvent(WiFiEvent);

Expand Down
6 changes: 3 additions & 3 deletions examples/simpleAsync-esp32/simpleAsync-esp32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ void connectToMqtt() {
void WiFiEvent(WiFiEvent_t event) {
Serial.printf("[WiFi-event] event: %d\n", event);
switch(event) {
case SYSTEM_EVENT_STA_GOT_IP:
case ARDUINO_EVENT_WIFI_STA_GOT_IP:
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
connectToMqtt();
break;
case SYSTEM_EVENT_STA_DISCONNECTED:
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
Serial.println("WiFi lost connection");
break;
default:
Expand Down Expand Up @@ -117,7 +117,7 @@ void setup() {
Serial.println();
Serial.println();

WiFi.setAutoConnect(false);
WiFi.persistent(false);
WiFi.setAutoReconnect(true);
WiFi.onEvent(WiFiEvent);

Expand Down
6 changes: 3 additions & 3 deletions examples/tls-esp32/tls-esp32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ void connectToMqtt() {
void WiFiEvent(WiFiEvent_t event) {
Serial.printf("[WiFi-event] event: %d\n", event);
switch(event) {
case SYSTEM_EVENT_STA_GOT_IP:
case ARDUINO_EVENT_WIFI_STA_GOT_IP:
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
connectToMqtt();
break;
case SYSTEM_EVENT_STA_DISCONNECTED:
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
Serial.println("WiFi lost connection");
break;
default:
Expand Down Expand Up @@ -128,7 +128,7 @@ void setup() {
Serial.println();
Serial.println();

WiFi.setAutoConnect(false);
WiFi.persistent(false);
WiFi.setAutoReconnect(true);
WiFi.onEvent(WiFiEvent);

Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"type": "git",
"url": "https://github.com/bertmelis/espMqttClient.git"
},
"version": "1.6.0",
"version": "1.7.0",
"frameworks": "arduino",
"platforms": ["espressif8266", "espressif32"],
"headers": ["espMqttClient.h", "espMqttClientAsync.h"],
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=espMqttClient
version=1.6.0
version=1.7.0
author=Bert Melis
maintainer=Bert Melis
sentence=an MQTT client for the Arduino framework for ESP8266 / ESP32
Expand Down

0 comments on commit 0de9711

Please sign in to comment.