MCPcopy Create free account
hub / github.com/bmorcelli/Launcher / startWebUi

Function startWebUi

src/webInterface.cpp:1056–1083  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1054}
1055
1056void startWebUi(String ssid, int encryptation, bool mode_ap) {
1057 file_size = 0;
1058#ifndef HEADLESS
1059 getConfigs();
1060#endif
1061 config.httpuser = wui_usr;
1062 config.httppassword = wui_pwd;
1063 config.webserverporthttp = default_webserverporthttp;
1064
1065 if (launcherWifiIsConnected() && mode_ap) launcherWifiStop();
1066 if (!launcherWifiIsConnected() || mode_ap) wifiConnect(ssid, encryptation, mode_ap);
1067 vTaskDelay(pdMS_TO_TICKS(250));
1068
1069 launcherConsolePrintln("Configuring Webserver ...");
1070 server = launcherWebServerStart(config.webserverporthttp);
1071 if (!server) {
1072 launcherConsolePrintln("Failed to start Webserver");
1073 return;
1074 }
1075 configureWebServer();
1076 vTaskDelay(pdTICKS_TO_MS(500));
1077
1078 startWebUiLoopCommon(mode_ap);
1079 stopWebServerAndWifi();
1080#ifndef HEADLESS
1081 tft->fillScreen(BGCOLOR);
1082#endif
1083}

Callers 3

webUIMyNetFunction · 0.85
loopOptionsWebUiFunction · 0.85
loopFunction · 0.85

Calls 9

getConfigsFunction · 0.85
launcherWifiIsConnectedFunction · 0.85
launcherWifiStopFunction · 0.85
wifiConnectFunction · 0.85
launcherConsolePrintlnFunction · 0.85
launcherWebServerStartFunction · 0.85
configureWebServerFunction · 0.85
stopWebServerAndWifiFunction · 0.85
fillScreenMethod · 0.45

Tested by

no test coverage detected