mirror of
https://github.com/Laxilef/OTGateway.git
synced 2026-03-22 02:08:40 +05:00
refactor: migrating from Telnet to WebSerial for remote logging
This commit is contained in:
@@ -13,6 +13,7 @@ using namespace NetworkUtils;
|
||||
extern NetworkMgr* network;
|
||||
extern FileData fsNetworkSettings, fsSettings, fsSensorsSettings;
|
||||
extern MqttTask* tMqtt;
|
||||
extern WebSerial* webSerial;
|
||||
|
||||
|
||||
class PortalTask : public LeanTask {
|
||||
@@ -76,6 +77,11 @@ protected:
|
||||
return request->requestAuthentication(AsyncAuthType::AUTH_BASIC, PROJECT_NAME, "Authentication failed");
|
||||
});
|
||||
|
||||
// web serial
|
||||
if (webSerial != nullptr) {
|
||||
webSerial->begin(this->webServer);
|
||||
}
|
||||
|
||||
// index page
|
||||
this->webServer->on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
request->redirect("/index.html");
|
||||
|
||||
Reference in New Issue
Block a user