Skip to content

Commit 7c3049e

Browse files
committed
test works
1 parent b21d763 commit 7c3049e

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/wifi/AdafruitIO_RP2040.h

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -137,29 +137,19 @@ class AdafruitIO_RP2040 : public AdafruitIO {
137137
*/
138138
/**************************************************************************/
139139
void _connect() {
140-
141-
if (WiFi.status() == WL_CONNECTED)
142-
return;
143-
144140
if (strlen(_ssid) == 0) {
141+
Serial.println("Invalid SSID!");
145142
_status = AIO_SSID_INVALID;
146143
} else {
147144
_disconnect();
148-
delay(5000);
145+
delay(10000);
149146
WiFi.mode(WIFI_STA);
150147
WiFi.setTimeout(20000);
151148
WiFi.begin(_ssid, _pass);
152-
// Wait setTimeout duration for a connection and check if connected every
153-
// 5 seconds
154-
for (int i = 0; i < 4; i++) {
155-
delay(5000);
156-
if (WiFi.status() == WL_CONNECTED) {
157-
_status = AIO_NET_CONNECTED;
158-
return;
159-
}
160-
}
149+
Serial.println("\nConnecting");
161150
_status = AIO_NET_DISCONNECTED;
162151
}
152+
_mqtt_client->setCACert(_aio_root_ca_prod);
163153
}
164154

165155
/**************************************************************************/

0 commit comments

Comments
 (0)