1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-06-07 16:55:23 +02:00

Provide ability to set WiFi false on ESP32

This commit is contained in:
Ash-4 2025-05-31 10:08:50 -05:00
parent 08ef723a86
commit 94b0a7e364

View File

@ -31,6 +31,7 @@
* © 2020-2021 Chris Harlow, Harald Barth, David Cutting,
* Fred Decker, Gregor Baues, Anthony W - Dayton
* © 2023 Nathan Kellenicki
* © 2025 Herb Morton
* All rights reserved.
*
* This file is part of CommandStation-EX
@ -109,9 +110,10 @@ void setup()
WifiInterface::setup(WIFI_SERIAL_LINK_SPEED, F(WIFI_SSID), F(WIFI_PASSWORD), F(WIFI_HOSTNAME), IP_PORT, WIFI_CHANNEL, WIFI_FORCE_AP);
#endif // WIFI_ON
#else
// ESP32 needs wifi on always
PASSWDCHECK(WIFI_PASSWORD); // compile time check
#if WIFI_ON
PASSWDCHECK(WIFI_PASSWORD); // compile time check
WifiESP::setup(WIFI_SSID, WIFI_PASSWORD, WIFI_HOSTNAME, IP_PORT, WIFI_CHANNEL, WIFI_FORCE_AP);
#endif // WIFI_ON
#endif // ARDUINO_ARCH_ESP32
#if ETHERNET_ON
@ -176,9 +178,11 @@ void loop()
#endif //WIFI_ON
#else //ARDUINO_ARCH_ESP32
#if WIFI_ON
#ifndef WIFI_TASK_ON_CORE0
WifiESP::loop();
#endif
#endif //WIFI_ON
#endif //ARDUINO_ARCH_ESP32
#if ETHERNET_ON
EthernetInterface::loop();