Add Captive Portal (#624)
* WIP: Captive Portal * Updates * Updates * Lint * Fixes
This commit is contained in:
@@ -38,50 +38,6 @@ bool network_is_connected() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void network_setup() {
|
||||
bool ready = true;
|
||||
#ifdef USE_ETHERNET
|
||||
if (ethernet::global_eth_component != nullptr) {
|
||||
ethernet::global_eth_component->call_setup();
|
||||
ready = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_WIFI
|
||||
if (wifi::global_wifi_component != nullptr) {
|
||||
wifi::global_wifi_component->call_setup();
|
||||
ready = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
while (!ready) {
|
||||
#ifdef USE_ETHERNET
|
||||
if (ethernet::global_eth_component != nullptr) {
|
||||
ethernet::global_eth_component->call_loop();
|
||||
ready = ready || ethernet::global_eth_component->can_proceed();
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_WIFI
|
||||
if (wifi::global_wifi_component != nullptr) {
|
||||
wifi::global_wifi_component->call_loop();
|
||||
ready = ready || wifi::global_wifi_component->can_proceed();
|
||||
}
|
||||
#endif
|
||||
|
||||
App.feed_wdt();
|
||||
}
|
||||
}
|
||||
void network_tick() {
|
||||
#ifdef USE_ETHERNET
|
||||
if (ethernet::global_eth_component != nullptr)
|
||||
ethernet::global_eth_component->call_loop();
|
||||
#endif
|
||||
#ifdef USE_WIFI
|
||||
if (wifi::global_wifi_component != nullptr)
|
||||
wifi::global_wifi_component->call_loop();
|
||||
#endif
|
||||
}
|
||||
|
||||
void network_setup_mdns() {
|
||||
MDNS.begin(App.get_name().c_str());
|
||||
#ifdef USE_API
|
||||
|
||||
Reference in New Issue
Block a user