reorder the AP mode according latest doc (#905)

update platformio.ini to be compatible with latest update
This commit is contained in:
Luc 2023-03-19 14:39:19 +08:00 committed by GitHub
parent fa7f87f3da
commit b62247ac56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 23 deletions

View File

@ -345,20 +345,10 @@ bool WIFI_CONFIG::Setup (bool force_ap)
WiFi.mode (WIFI_AP);
#ifdef ARDUINO_ARCH_ESP32
esp_wifi_set_protocol (WIFI_IF_AP, bflag);
#endif
wifi_config.WiFi_on = true;
delay (50);
WiFi.softAP (sbuf, pwd);
#ifdef ESP_OLED_FEATURE
OLED_DISPLAY::display_signal(100);
OLED_DISPLAY::setCursor(0, 0);
ESPCOM::print(sbuf, OLED_PIPE);
#endif
delay (100);
#ifdef ARDUINO_ARCH_ESP8266
#else
WiFi.setPhyMode ( (WiFiPhyMode_t) bflag);
#endif
delay (100);
wifi_config.WiFi_on = true;
LOG ("Get current config\r\n")
//get current config
#ifdef ARDUINO_ARCH_ESP32
@ -395,7 +385,6 @@ bool WIFI_CONFIG::Setup (bool force_ap)
#else
apconfig.ssid_hidden = !bflag;
#endif
//no need to add these settings to configuration just use default ones
#ifdef ARDUINO_ARCH_ESP32
conf.ap.max_connection = DEFAULT_MAX_CONNECTIONS;
@ -413,6 +402,13 @@ bool WIFI_CONFIG::Setup (bool force_ap)
delay (1000);
}
#endif
WiFi.softAP (sbuf, pwd);
#ifdef ESP_OLED_FEATURE
OLED_DISPLAY::display_signal(100);
OLED_DISPLAY::setCursor(0, 0);
ESPCOM::print(sbuf, OLED_PIPE);
#endif
delay (100);
} else {
LOG ("Set STA mode\r\n")
if (!CONFIG::read_string (EP_STA_SSID, sbuf, MAX_SSID_LENGTH) ) {

View File

@ -22,7 +22,7 @@ platform = espressif32@3.0.0
board = esp32dev
framework = arduino
monitor_speed = 115200
monitor_flags = --echo
monitor_echo = yes
monitor_filters = send_on_enter, colorize, esp32_exception_decoder
; set frequency to 240MHz
board_build.f_cpu = 240000000L
@ -33,7 +33,7 @@ board_build.flash_mode = qio
build_flags = -DCORE_DEBUG_LEVEL=0
board_build.partitions = default.csv
upload_speed = 921600
lib_ignore =
lib_ignore =
ESPAsyncTCP
[env:esp8266]
@ -43,22 +43,22 @@ platform_packages = toolchain-xtensa@2.40802.200502
board = esp12e
framework = arduino
monitor_speed = 115200
monitor_flags = --echo
monitor_filters = colorize
monitor_echo = yes
monitor_filters = send_on_enter, colorize, esp8266_exception_decoder
; set frequency to 160MHz
board_build.f_cpu = 160000000L
; set frequency to 40MHz
board_build.f_flash = 40000000L
board_build.flash_mode = dout
upload_resetmethod = nodemcu
build_flags =
build_flags =
-Wl,-Teagle.flash.4m2m.ld
-D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
-DNONOSDK221=1
-DNDEBUG
-DVTABLES_IN_FLASH
upload_speed = 115200
lib_ignore =
lib_ignore =
AsyncTCP
ESP32NetBIOS
ESP32SSPD
@ -69,8 +69,8 @@ platform = espressif8266@2.6.2
board = esp01_1m
framework = arduino
monitor_speed = 115200
monitor_flags = --echo
monitor_filters = colorize
monitor_echo = yes
monitor_filters = send_on_enter, colorize, esp8266_exception_decoder
board_build.f_cpu = 160000000L
board_build.f_flash = 40000000L
board_build.flash_mode = dout
@ -93,8 +93,8 @@ platform_packages = toolchain-xtensa@2.40802.200502
board = esp01_1m
framework = arduino
monitor_speed = 115200
monitor_flags = --echo
monitor_filters = colorize
monitor_echo = yes
monitor_filters = send_on_enter, colorize, esp8266_exception_decoder
board_build.f_cpu = 160000000L
board_build.f_flash = 40000000L
board_build.flash_mode = dout