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); WiFi.mode (WIFI_AP);
#ifdef ARDUINO_ARCH_ESP32 #ifdef ARDUINO_ARCH_ESP32
esp_wifi_set_protocol (WIFI_IF_AP, bflag); esp_wifi_set_protocol (WIFI_IF_AP, bflag);
#endif #else
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
WiFi.setPhyMode ( (WiFiPhyMode_t) bflag); WiFi.setPhyMode ( (WiFiPhyMode_t) bflag);
#endif #endif
delay (100); wifi_config.WiFi_on = true;
LOG ("Get current config\r\n") LOG ("Get current config\r\n")
//get current config //get current config
#ifdef ARDUINO_ARCH_ESP32 #ifdef ARDUINO_ARCH_ESP32
@ -395,7 +385,6 @@ bool WIFI_CONFIG::Setup (bool force_ap)
#else #else
apconfig.ssid_hidden = !bflag; apconfig.ssid_hidden = !bflag;
#endif #endif
//no need to add these settings to configuration just use default ones //no need to add these settings to configuration just use default ones
#ifdef ARDUINO_ARCH_ESP32 #ifdef ARDUINO_ARCH_ESP32
conf.ap.max_connection = DEFAULT_MAX_CONNECTIONS; conf.ap.max_connection = DEFAULT_MAX_CONNECTIONS;
@ -413,6 +402,13 @@ bool WIFI_CONFIG::Setup (bool force_ap)
delay (1000); delay (1000);
} }
#endif #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 { } else {
LOG ("Set STA mode\r\n") LOG ("Set STA mode\r\n")
if (!CONFIG::read_string (EP_STA_SSID, sbuf, MAX_SSID_LENGTH) ) { if (!CONFIG::read_string (EP_STA_SSID, sbuf, MAX_SSID_LENGTH) ) {

View File

@ -22,7 +22,7 @@ platform = espressif32@3.0.0
board = esp32dev board = esp32dev
framework = arduino framework = arduino
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
monitor_filters = send_on_enter, colorize, esp32_exception_decoder monitor_filters = send_on_enter, colorize, esp32_exception_decoder
; set frequency to 240MHz ; set frequency to 240MHz
board_build.f_cpu = 240000000L board_build.f_cpu = 240000000L
@ -43,8 +43,8 @@ platform_packages = toolchain-xtensa@2.40802.200502
board = esp12e board = esp12e
framework = arduino framework = arduino
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
monitor_filters = colorize monitor_filters = send_on_enter, colorize, esp8266_exception_decoder
; set frequency to 160MHz ; set frequency to 160MHz
board_build.f_cpu = 160000000L board_build.f_cpu = 160000000L
; set frequency to 40MHz ; set frequency to 40MHz
@ -69,8 +69,8 @@ platform = espressif8266@2.6.2
board = esp01_1m board = esp01_1m
framework = arduino framework = arduino
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
monitor_filters = colorize monitor_filters = send_on_enter, colorize, esp8266_exception_decoder
board_build.f_cpu = 160000000L board_build.f_cpu = 160000000L
board_build.f_flash = 40000000L board_build.f_flash = 40000000L
board_build.flash_mode = dout board_build.flash_mode = dout
@ -93,8 +93,8 @@ platform_packages = toolchain-xtensa@2.40802.200502
board = esp01_1m board = esp01_1m
framework = arduino framework = arduino
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
monitor_filters = colorize monitor_filters = send_on_enter, colorize, esp8266_exception_decoder
board_build.f_cpu = 160000000L board_build.f_cpu = 160000000L
board_build.f_flash = 40000000L board_build.f_flash = 40000000L
board_build.flash_mode = dout board_build.flash_mode = dout