2323#include " ESP8266WiFi.h"
2424#include " ESP8266WiFiMulti.h"
2525#include " Wippersnapper.h"
26+ #include " Wippersnapper_Networking.h"
2627
2728/* NOTE - Projects that require "Secure MQTT" (TLS/SSL) also require a new
2829 * SSL certificate every year. If adding Secure MQTT to your ESP8266 project is
@@ -160,7 +161,7 @@ class Wippersnapper_ESP8266 : public Wippersnapper {
160161 WiFiNetwork networks[WS_MAX_SORTED_NETWORKS];
161162 uint8_t numSavedNetworks = 0 ;
162163 // Store the scanned networks in the vector
163- for (int i = 0 ; i < n; ++i ) {
164+ for (int i = 0 ; i < n; i++ ) {
164165 if (i < WS_MAX_SORTED_NETWORKS) {
165166 strncpy (networks[i].ssid , WiFi.SSID (i).c_str (),
166167 sizeof (networks[i].ssid ));
@@ -182,7 +183,7 @@ class Wippersnapper_ESP8266 : public Wippersnapper {
182183 std::sort (networks, networks + numSavedNetworks, compareByRSSI);
183184
184185 // Was the network within secrets.json found?
185- for (int i = 0 ; i < numSavedNetworks; ++i ) {
186+ for (int i = 0 ; i < numSavedNetworks; i++ ) {
186187 if (strcmp (_ssid, networks[i].ssid ) == 0 ) {
187188 WS_DEBUG_PRINT (" SSID (" );
188189 WS_DEBUG_PRINT (_ssid);
@@ -207,7 +208,7 @@ class Wippersnapper_ESP8266 : public Wippersnapper {
207208 // User-set network not found, print scan results to serial console
208209 WS_DEBUG_PRINTLN (" ERROR: Your WiFi network was not found!" );
209210 WS_DEBUG_PRINTLN (" WipperSnapper found these WiFi networks:" );
210- for (uint8_t i = 0 ; i < n; ++i )
211+ for (uint8_t i = 0 ; i < n; i++ )
211212 {
212213 WS_DEBUG_PRINT (WiFi.SSID (i));
213214 WS_DEBUG_PRINT (" (" );
0 commit comments