Added small dialog to show inverter info (firmware version etc.)

This commit is contained in:
Thomas Basler
2022-08-11 16:42:50 +02:00
parent 991838ae2c
commit 217fddf405
7 changed files with 195 additions and 15 deletions

View File

@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "WebApi_devinfo.h"
#include "WebApi_dtu.h"
#include "WebApi_eventlog.h"
#include "WebApi_firmware.h"
@@ -23,6 +24,7 @@ private:
AsyncWebServer _server;
AsyncEventSource _events;
WebApiDevInfoClass _webApiDevInfo;
WebApiDtuClass _webApiDtu;
WebApiEventlogClass _webApiEventlog;
WebApiFirmwareClass _webApiFirmware;

15
include/WebApi_devinfo.h Normal file
View File

@@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <ESPAsyncWebServer.h>
class WebApiDevInfoClass {
public:
void init(AsyncWebServer* server);
void loop();
private:
void onDevInfoStatus(AsyncWebServerRequest* request);
AsyncWebServer* _server;
};