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:
parent
08ef723a86
commit
94b0a7e364
@ -31,6 +31,7 @@
|
|||||||
* © 2020-2021 Chris Harlow, Harald Barth, David Cutting,
|
* © 2020-2021 Chris Harlow, Harald Barth, David Cutting,
|
||||||
* Fred Decker, Gregor Baues, Anthony W - Dayton
|
* Fred Decker, Gregor Baues, Anthony W - Dayton
|
||||||
* © 2023 Nathan Kellenicki
|
* © 2023 Nathan Kellenicki
|
||||||
|
* © 2025 Herb Morton
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This file is part of CommandStation-EX
|
* 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);
|
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
|
#endif // WIFI_ON
|
||||||
#else
|
#else
|
||||||
// ESP32 needs wifi on always
|
#if WIFI_ON
|
||||||
PASSWDCHECK(WIFI_PASSWORD); // compile time check
|
PASSWDCHECK(WIFI_PASSWORD); // compile time check
|
||||||
WifiESP::setup(WIFI_SSID, WIFI_PASSWORD, WIFI_HOSTNAME, IP_PORT, WIFI_CHANNEL, WIFI_FORCE_AP);
|
WifiESP::setup(WIFI_SSID, WIFI_PASSWORD, WIFI_HOSTNAME, IP_PORT, WIFI_CHANNEL, WIFI_FORCE_AP);
|
||||||
|
#endif // WIFI_ON
|
||||||
#endif // ARDUINO_ARCH_ESP32
|
#endif // ARDUINO_ARCH_ESP32
|
||||||
|
|
||||||
#if ETHERNET_ON
|
#if ETHERNET_ON
|
||||||
@ -176,9 +178,11 @@ void loop()
|
|||||||
|
|
||||||
#endif //WIFI_ON
|
#endif //WIFI_ON
|
||||||
#else //ARDUINO_ARCH_ESP32
|
#else //ARDUINO_ARCH_ESP32
|
||||||
|
#if WIFI_ON
|
||||||
#ifndef WIFI_TASK_ON_CORE0
|
#ifndef WIFI_TASK_ON_CORE0
|
||||||
WifiESP::loop();
|
WifiESP::loop();
|
||||||
#endif
|
#endif
|
||||||
|
#endif //WIFI_ON
|
||||||
#endif //ARDUINO_ARCH_ESP32
|
#endif //ARDUINO_ARCH_ESP32
|
||||||
#if ETHERNET_ON
|
#if ETHERNET_ON
|
||||||
EthernetInterface::loop();
|
EthernetInterface::loop();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user