mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-11 07:56:39 +02:00
* improved api (now webApi)
* converted index to static page
This commit is contained in:
parent
08d8658737
commit
440d386ec0
11 changed files with 266 additions and 240 deletions
38
tools/esp8266/webApi.h
Normal file
38
tools/esp8266/webApi.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
#ifndef __WEB_API_H__
|
||||
#define __WEB_API_H__
|
||||
|
||||
#include "dbg.h"
|
||||
#include "ESPAsyncTCP.h"
|
||||
#include "ESPAsyncWebServer.h"
|
||||
#include "app.h"
|
||||
|
||||
|
||||
class app;
|
||||
|
||||
class webApi {
|
||||
public:
|
||||
webApi(AsyncWebServer *srv, app *app, sysConfig_t *sysCfg, config_t *config, statistics_t *stat, char version[]);
|
||||
|
||||
void setup(void);
|
||||
void loop(void);
|
||||
|
||||
private:
|
||||
void onSystem(AsyncWebServerRequest *request);
|
||||
void onStatistics(AsyncWebServerRequest *request);
|
||||
void onInverterList(AsyncWebServerRequest *request);
|
||||
void onMqtt(AsyncWebServerRequest *request);
|
||||
void onNtp(AsyncWebServerRequest *request);
|
||||
void onPinout(AsyncWebServerRequest *request);
|
||||
void onRadio(AsyncWebServerRequest *request);
|
||||
void onSerial(AsyncWebServerRequest *request);
|
||||
|
||||
AsyncWebServer *mSrv;
|
||||
app *mApp;
|
||||
|
||||
config_t *mConfig;
|
||||
sysConfig_t *mSysCfg;
|
||||
statistics_t *mStat;
|
||||
char *mVersion;
|
||||
};
|
||||
|
||||
#endif /*__WEB_API_H__*/
|
Loading…
Add table
Add a link
Reference in a new issue