diff --git a/Makefile b/Makefile index 5b79fef74..556f9bc46 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ PROJECT_VER_MAJOR := 1 PROJECT_VER_MINOR := 0 PROJECT_VER_PATCH := 0 PROJECT_VER_BUILD := beta -PROJECT_VER_BUILD_NUM := 5 +PROJECT_VER_BUILD_NUM := 6 BOARD_PYPORTAL := samd51-pyportal BOARD_METRO_AIRLIFT := samd51-metro-airlift diff --git a/library.properties b/library.properties index 3dd07ca0a..2e40f21c6 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit WipperSnapper -version=1.0.0-beta.4 +version=1.0.0-beta.6 author=Adafruit maintainer=Adafruit sentence=Arduino library to access WipperSnapper diff --git a/src/Wippersnapper.h b/src/Wippersnapper.h index 2acd8c6c5..0f87bf585 100644 --- a/src/Wippersnapper.h +++ b/src/Wippersnapper.h @@ -64,7 +64,7 @@ #endif #define WS_VERSION \ - "1.0.0-beta.5" ///< WipperSnapper app. version (semver-formatted) + "1.0.0-beta.6" ///< WipperSnapper app. version (semver-formatted) // Reserved Adafruit IO MQTT topics #define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic diff --git a/src/network_interfaces/Wippersnapper_AIRLIFT.h b/src/network_interfaces/Wippersnapper_AIRLIFT.h index cff4e0ce9..2f5d73229 100644 --- a/src/network_interfaces/Wippersnapper_AIRLIFT.h +++ b/src/network_interfaces/Wippersnapper_AIRLIFT.h @@ -50,10 +50,14 @@ class Wippersnapper_AIRLIFT : public Wippersnapper { _ssPin = 10; _ackPin = 7; _rstPin = 5; + _gpio0Pin = -1; _wifi = &SPIWIFI; _ssid = 0; _pass = 0; _mqtt_client = new WiFiSSLClient; + + // setup ESP32 co-processor pins during init. + WiFi.setPins(_ssPin, _ackPin, _rstPin, _gpio0Pin, _wifi); } /**************************************************************************/ @@ -193,7 +197,7 @@ class Wippersnapper_AIRLIFT : public Wippersnapper { protected: const char *_ssid; const char *_pass; - String _fv = "0.0.0"; + String _fv; uint8_t mac[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; int _ssPin, _ackPin, _rstPin, _gpio0Pin = -1; WiFiSSLClient *_mqtt_client; @@ -208,23 +212,19 @@ class Wippersnapper_AIRLIFT : public Wippersnapper { if (strlen(_ssid) == 0) { _status = WS_SSID_INVALID; } else { - // setup ESP32 pins - if (_ssPin != -1) { - WiFi.setPins(_ssPin, _ackPin, _rstPin, _gpio0Pin, _wifi); + + // check if co-processor connected first + if (WiFi.status() == WL_NO_MODULE) { + WS_DEBUG_PRINT("No ESP32 module detected!"); + return; } - // validate up-to-date nina-fw version + // validate the nina-fw version firmwareCheck(); // disconnect from possible previous connection _disconnect(); - // check for esp32 module - if (WiFi.status() == WL_NO_MODULE) { - WS_DEBUG_PRINT("No ESP32 module detected!"); - return; - } - WiFi.begin(_ssid, _pass); _status = WS_NET_DISCONNECTED; }