minor changes
This commit is contained in:
parent
f176227914
commit
db679de8b8
2 changed files with 3 additions and 16 deletions
|
@ -8,19 +8,9 @@
|
||||||
; Please visit documentation for the other options and examples
|
; Please visit documentation for the other options and examples
|
||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[env:esp32-evb]
|
[env:esp32]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = esp32-evb
|
board = esp32dev
|
||||||
framework = arduino
|
|
||||||
monitor_speed = 115200
|
|
||||||
build_flags =
|
|
||||||
-DHTTPS_LOGLEVEL=1
|
|
||||||
-DCORE_DEBUG_LEVEL=3
|
|
||||||
lib_deps = bblanchon/ArduinoJson@^6.19.4
|
|
||||||
|
|
||||||
[env:esp32-dev]
|
|
||||||
platform = espressif32
|
|
||||||
board = az-delivery-devkit-v4
|
|
||||||
framework = arduino
|
framework = arduino
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
build_flags =
|
build_flags =
|
||||||
|
|
|
@ -6,15 +6,12 @@ firewall::API *firewall_api;
|
||||||
|
|
||||||
void setup_wifi()
|
void setup_wifi()
|
||||||
{
|
{
|
||||||
uint8_t max_retries = 5;
|
|
||||||
uint8_t retries = 1;
|
|
||||||
log_d("Attempting to connect to WPA SSID: %s", ssid);
|
log_d("Attempting to connect to WPA SSID: %s", ssid);
|
||||||
WiFi.mode(WIFI_STA);
|
WiFi.mode(WIFI_STA);
|
||||||
WiFi.begin(ssid, psk);
|
WiFi.begin(ssid, psk);
|
||||||
while (WiFi.status() != WL_CONNECTED && retries <= max_retries)
|
while (WiFi.status() != WL_CONNECTED)
|
||||||
{
|
{
|
||||||
delay(2000);
|
delay(2000);
|
||||||
log_d("Connecting... (%i/%i)", retries++, max_retries);
|
|
||||||
}
|
}
|
||||||
log_i("IP Address: %s", WiFi.localIP().toString().c_str());
|
log_i("IP Address: %s", WiFi.localIP().toString().c_str());
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue