Add Captive Portal (#624)

* WIP: Captive Portal

* Updates

* Updates

* Lint

* Fixes
This commit is contained in:
Otto Winter
2019-06-09 17:03:51 +02:00
committed by GitHub
parent 8db6f3129c
commit 36f47ade70
38 changed files with 846 additions and 326 deletions

View File

@@ -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