Skip to content

Commit 2917f0a

Browse files
authored
Merge pull request #130 from adafruit/fix-airlift
Fix "AirLift Not Found" error
2 parents 27a2c7f + 5103ef2 commit 2917f0a

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PROJECT_VER_MAJOR := 1
77
PROJECT_VER_MINOR := 0
88
PROJECT_VER_PATCH := 0
99
PROJECT_VER_BUILD := beta
10-
PROJECT_VER_BUILD_NUM := 5
10+
PROJECT_VER_BUILD_NUM := 6
1111

1212
BOARD_PYPORTAL := samd51-pyportal
1313
BOARD_METRO_AIRLIFT := samd51-metro-airlift

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Adafruit WipperSnapper
2-
version=1.0.0-beta.4
2+
version=1.0.0-beta.6
33
author=Adafruit
44
maintainer=Adafruit <[email protected]>
55
sentence=Arduino library to access WipperSnapper

src/Wippersnapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#endif
6565

6666
#define WS_VERSION \
67-
"1.0.0-beta.5" ///< WipperSnapper app. version (semver-formatted)
67+
"1.0.0-beta.6" ///< WipperSnapper app. version (semver-formatted)
6868

6969
// Reserved Adafruit IO MQTT topics
7070
#define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic

src/network_interfaces/Wippersnapper_AIRLIFT.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,14 @@ class Wippersnapper_AIRLIFT : public Wippersnapper {
5050
_ssPin = 10;
5151
_ackPin = 7;
5252
_rstPin = 5;
53+
_gpio0Pin = -1;
5354
_wifi = &SPIWIFI;
5455
_ssid = 0;
5556
_pass = 0;
5657
_mqtt_client = new WiFiSSLClient;
58+
59+
// setup ESP32 co-processor pins during init.
60+
WiFi.setPins(_ssPin, _ackPin, _rstPin, _gpio0Pin, _wifi);
5761
}
5862

5963
/**************************************************************************/
@@ -193,7 +197,7 @@ class Wippersnapper_AIRLIFT : public Wippersnapper {
193197
protected:
194198
const char *_ssid;
195199
const char *_pass;
196-
String _fv = "0.0.0";
200+
String _fv;
197201
uint8_t mac[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
198202
int _ssPin, _ackPin, _rstPin, _gpio0Pin = -1;
199203
WiFiSSLClient *_mqtt_client;
@@ -208,23 +212,19 @@ class Wippersnapper_AIRLIFT : public Wippersnapper {
208212
if (strlen(_ssid) == 0) {
209213
_status = WS_SSID_INVALID;
210214
} else {
211-
// setup ESP32 pins
212-
if (_ssPin != -1) {
213-
WiFi.setPins(_ssPin, _ackPin, _rstPin, _gpio0Pin, _wifi);
215+
216+
// check if co-processor connected first
217+
if (WiFi.status() == WL_NO_MODULE) {
218+
WS_DEBUG_PRINT("No ESP32 module detected!");
219+
return;
214220
}
215221

216-
// validate up-to-date nina-fw version
222+
// validate the nina-fw version
217223
firmwareCheck();
218224

219225
// disconnect from possible previous connection
220226
_disconnect();
221227

222-
// check for esp32 module
223-
if (WiFi.status() == WL_NO_MODULE) {
224-
WS_DEBUG_PRINT("No ESP32 module detected!");
225-
return;
226-
}
227-
228228
WiFi.begin(_ssid, _pass);
229229
_status = WS_NET_DISCONNECTED;
230230
}

0 commit comments

Comments
 (0)