Skip to content

Commit b62247a

Browse files
authored
reorder the AP mode according latest doc (#905)
update platformio.ini to be compatible with latest update
1 parent fa7f87f commit b62247a

File tree

2 files changed

+19
-23
lines changed

2 files changed

+19
-23
lines changed

esp3d/wificonf.cpp

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -345,20 +345,10 @@ bool WIFI_CONFIG::Setup (bool force_ap)
345345
WiFi.mode (WIFI_AP);
346346
#ifdef ARDUINO_ARCH_ESP32
347347
esp_wifi_set_protocol (WIFI_IF_AP, bflag);
348-
#endif
349-
wifi_config.WiFi_on = true;
350-
delay (50);
351-
WiFi.softAP (sbuf, pwd);
352-
#ifdef ESP_OLED_FEATURE
353-
OLED_DISPLAY::display_signal(100);
354-
OLED_DISPLAY::setCursor(0, 0);
355-
ESPCOM::print(sbuf, OLED_PIPE);
356-
#endif
357-
delay (100);
358-
#ifdef ARDUINO_ARCH_ESP8266
348+
#else
359349
WiFi.setPhyMode ( (WiFiPhyMode_t) bflag);
360350
#endif
361-
delay (100);
351+
wifi_config.WiFi_on = true;
362352
LOG ("Get current config\r\n")
363353
//get current config
364354
#ifdef ARDUINO_ARCH_ESP32
@@ -395,7 +385,6 @@ bool WIFI_CONFIG::Setup (bool force_ap)
395385
#else
396386
apconfig.ssid_hidden = !bflag;
397387
#endif
398-
399388
//no need to add these settings to configuration just use default ones
400389
#ifdef ARDUINO_ARCH_ESP32
401390
conf.ap.max_connection = DEFAULT_MAX_CONNECTIONS;
@@ -413,6 +402,13 @@ bool WIFI_CONFIG::Setup (bool force_ap)
413402
delay (1000);
414403
}
415404
#endif
405+
WiFi.softAP (sbuf, pwd);
406+
#ifdef ESP_OLED_FEATURE
407+
OLED_DISPLAY::display_signal(100);
408+
OLED_DISPLAY::setCursor(0, 0);
409+
ESPCOM::print(sbuf, OLED_PIPE);
410+
#endif
411+
delay (100);
416412
} else {
417413
LOG ("Set STA mode\r\n")
418414
if (!CONFIG::read_string (EP_STA_SSID, sbuf, MAX_SSID_LENGTH) ) {

platformio.ini

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ platform = [email protected]
2222
board = esp32dev
2323
framework = arduino
2424
monitor_speed = 115200
25-
monitor_flags = --echo
25+
monitor_echo = yes
2626
monitor_filters = send_on_enter, colorize, esp32_exception_decoder
2727
; set frequency to 240MHz
2828
board_build.f_cpu = 240000000L
@@ -33,7 +33,7 @@ board_build.flash_mode = qio
3333
build_flags = -DCORE_DEBUG_LEVEL=0
3434
board_build.partitions = default.csv
3535
upload_speed = 921600
36-
lib_ignore =
36+
lib_ignore =
3737
ESPAsyncTCP
3838

3939
[env:esp8266]
@@ -43,22 +43,22 @@ platform_packages = [email protected]
4343
board = esp12e
4444
framework = arduino
4545
monitor_speed = 115200
46-
monitor_flags = --echo
47-
monitor_filters = colorize
46+
monitor_echo = yes
47+
monitor_filters = send_on_enter, colorize, esp8266_exception_decoder
4848
; set frequency to 160MHz
4949
board_build.f_cpu = 160000000L
5050
; set frequency to 40MHz
5151
board_build.f_flash = 40000000L
5252
board_build.flash_mode = dout
5353
upload_resetmethod = nodemcu
54-
build_flags =
54+
build_flags =
5555
-Wl,-Teagle.flash.4m2m.ld
5656
-D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
5757
-DNONOSDK221=1
5858
-DNDEBUG
5959
-DVTABLES_IN_FLASH
6060
upload_speed = 115200
61-
lib_ignore =
61+
lib_ignore =
6262
AsyncTCP
6363
ESP32NetBIOS
6464
ESP32SSPD
@@ -69,8 +69,8 @@ platform = [email protected]
6969
board = esp01_1m
7070
framework = arduino
7171
monitor_speed = 115200
72-
monitor_flags = --echo
73-
monitor_filters = colorize
72+
monitor_echo = yes
73+
monitor_filters = send_on_enter, colorize, esp8266_exception_decoder
7474
board_build.f_cpu = 160000000L
7575
board_build.f_flash = 40000000L
7676
board_build.flash_mode = dout
@@ -93,8 +93,8 @@ platform_packages = [email protected]
9393
board = esp01_1m
9494
framework = arduino
9595
monitor_speed = 115200
96-
monitor_flags = --echo
97-
monitor_filters = colorize
96+
monitor_echo = yes
97+
monitor_filters = send_on_enter, colorize, esp8266_exception_decoder
9898
board_build.f_cpu = 160000000L
9999
board_build.f_flash = 40000000L
100100
board_build.flash_mode = dout

0 commit comments

Comments
 (0)