* created new API functions

* bound html through ajax to parse setup page (not finished now)
* added compression option for static html to python module
* removed generated h-file from index (redundant information), they will be created on compile time
This commit is contained in:
lumapu 2022-08-27 02:27:32 +02:00
parent 2556197509
commit 13c88b3626
13 changed files with 347 additions and 213 deletions

32
tools/esp8266/api.h Normal file
View file

@ -0,0 +1,32 @@
#ifndef __API_H__
#define __API_H__
#include "dbg.h"
#include "ESPAsyncTCP.h"
#include "ESPAsyncWebServer.h"
#include "app.h"
class app;
class api {
public:
api(AsyncWebServer *srv, app *app, sysConfig_t *sysCfg, config_t *config, char version[]);
void setup(void);
void loop(void);
private:
void onSystem(AsyncWebServerRequest *request);
void onInverterList(AsyncWebServerRequest *request);
void onMqtt(AsyncWebServerRequest *request);
AsyncWebServer *mSrv;
app *mApp;
config_t *mConfig;
sysConfig_t *mSysCfg;
char *mVersion;
};
#endif /*__API_H__*/