Skip to content

Commit

Permalink
Merge pull request #130 from adafruit/fix-airlift
Browse files Browse the repository at this point in the history
Fix "AirLift Not Found" error
  • Loading branch information
brentru authored Aug 23, 2021
2 parents 27a2c7f + 5103ef2 commit 2917f0a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
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=Adafruit WipperSnapper
version=1.0.0-beta.4
version=1.0.0-beta.6
author=Adafruit
maintainer=Adafruit <adafruitio@adafruit.com>
sentence=Arduino library to access WipperSnapper
Expand Down
2 changes: 1 addition & 1 deletion src/Wippersnapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions src/network_interfaces/Wippersnapper_AIRLIFT.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**************************************************************************/
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 2917f0a

Please sign in to comment.