2024-05-30 23:38:05 +02:00
|
|
|
/**
|
|
|
|
* @file webui.h
|
|
|
|
*
|
2024-05-30 23:48:26 +02:00
|
|
|
* @brief Header file for the web-based user interface (WebUI) in the DE-Timer application.
|
2024-05-30 23:38:05 +02:00
|
|
|
*
|
|
|
|
* This file contains declarations for functions related to the initialization and processing of the
|
|
|
|
* web-based user interface (WebUI). It includes the necessary libraries and dependencies for handling
|
|
|
|
* web server functionality, asynchronous JSON operations, and live debugging through WebSockets.
|
|
|
|
*
|
|
|
|
* @author Marcel Peterkau
|
|
|
|
* @date 09.01.2024
|
|
|
|
*/
|
|
|
|
|
2022-04-14 22:48:11 +02:00
|
|
|
#ifndef _WEBUI_H_
|
|
|
|
#define _WEBUI_H_
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
#include <FS.h>
|
|
|
|
#include <LittleFS.h>
|
2023-02-13 22:59:42 +01:00
|
|
|
#include <ESPAsyncTCP.h>
|
2022-04-14 22:48:11 +02:00
|
|
|
#include <ESPAsyncWebServer.h>
|
2023-02-20 13:51:54 +01:00
|
|
|
#include <Updater.h>
|
|
|
|
#include <ESP8266mDNS.h>
|
|
|
|
#include <AsyncJson.h>
|
|
|
|
#include <ArduinoJson.h>
|
|
|
|
|
2024-05-30 23:38:05 +02:00
|
|
|
#include "config.h"
|
2022-04-14 22:48:11 +02:00
|
|
|
#include "globals.h"
|
|
|
|
#include "dtc.h"
|
2023-02-20 13:51:54 +01:00
|
|
|
#include "common.h"
|
2023-04-13 00:35:24 +02:00
|
|
|
#include "debugger.h"
|
2024-05-30 23:38:05 +02:00
|
|
|
#include "struct2json.h"
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
info,
|
|
|
|
success,
|
|
|
|
warning,
|
|
|
|
error
|
|
|
|
} NotificationType_t;
|
2022-04-14 22:48:11 +02:00
|
|
|
|
|
|
|
void initWebUI();
|
2023-04-13 00:35:24 +02:00
|
|
|
void Webserver_Process();
|
2024-05-30 23:38:05 +02:00
|
|
|
void Webserver_Shutdown();
|
|
|
|
|
2023-04-13 00:35:24 +02:00
|
|
|
void Websocket_PushLiveDebug(String Message);
|
2024-05-30 23:38:05 +02:00
|
|
|
void Websocket_PushNotification(String Message, NotificationType_t type);
|
2022-04-14 22:48:11 +02:00
|
|
|
|
2024-05-30 23:38:05 +02:00
|
|
|
#endif // _WEBUI_H_
|