Skip to content

Commit d2d377e

Browse files
brentrubrentru
authored andcommitted
integrate some comments from review
1 parent 54d1719 commit d2d377e

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

src/AdafruitIO_Definitions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ class AdafruitIOGroupCallback {
4242
};
4343

4444
// Uncomment/comment to turn on/off debug output messages.
45-
#define AIO_DEBUG
45+
// #define AIO_DEBUG
4646
// Uncomment/comment to turn on/off error output
47-
#define AIO_ERROR
47+
// #define AIO_ERROR
4848

4949
// Where debug messages will be printed
5050
// note: if you're using something like Zero or Due, change the below to SerialUSB

src/wifi/AdafruitIO_AIRLIFT.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ class AdafruitIO_AIRLIFT : public AdafruitIO {
5858
A reference to the gpio0Pin Pin.
5959
*/
6060
/**************************************************************************/
61-
AdafruitIO_AIRLIFT(const char *user, const char *key, const char *ssid, const char *pass, int ssPin, int ackPin, int rstPin, int gpio0Pin) : AdafruitIO(user, key)
61+
AdafruitIO_AIRLIFT(const char *user, const char *key, const char *ssid, const char *pass, int ssPin, int ackPin, int rstPin, int gpio0Pin, SPIClass& wifi) : AdafruitIO(user, key)
6262
{
63+
_wifi = wifi;
6364
_ssPin = ssPin;
6465
_ackPin = ackPin;
6566
_rstPin = rstPin;
@@ -141,7 +142,9 @@ class AdafruitIO_AIRLIFT : public AdafruitIO {
141142
const char *_ssid;
142143
const char *_pass;
143144
String _fv = "0.0.0";
144-
int _ssPin, _ackPin, _rstPin, _gpio0Pin = 0;
145+
int _ssPin, _ackPin, _rstPin, _gpio0Pin = -1;
146+
147+
SPIClass& _wifi;
145148

146149
WiFiSSLClient *_http_client;
147150
WiFiSSLClient *_mqtt_client;
@@ -155,8 +158,8 @@ class AdafruitIO_AIRLIFT : public AdafruitIO {
155158
void _connect()
156159
{
157160
// setup ESP32 pins
158-
if (_ssPin != 0) {
159-
WiFi.setPins(_ssPin, _ackPin, _rstPin, _gpio0Pin, &SPIWIFI);
161+
if (_ssPin != -1) {
162+
WiFi.setPins(_ssPin, _ackPin, _rstPin, _gpio0Pin, _wifi);
160163
}
161164

162165
// check esp32 module version against NINAFWVER

src/wifi/AdafruitIO_WINC1500.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
class AdafruitIO_WINC1500 : public AdafruitIO {
2525

2626
public:
27-
AdafruitIO_WINC1500(const char *user, const char *key, const char *ssid, const char *pass, int winc_cs, int winc_irq, int winc_rst, int winc_en) : AdafruitIO(user, key)
27+
AdafruitIO_WINC1500(const char *user, const char *key, const char *ssid, const char *pass, int winc_cs = 8, int winc_irq = 4, int winc_rst = 4, int winc_en = 2) : AdafruitIO(user, key)
2828
{
2929
_winc_cs = winc_cs;
3030
_winc_irq = winc_irq;

0 commit comments

Comments
 (0)