mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-29 07:47:03 +02:00
* 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:
parent
2556197509
commit
13c88b3626
13 changed files with 347 additions and 213 deletions
32
tools/esp8266/api.h
Normal file
32
tools/esp8266/api.h
Normal 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__*/
|
Loading…
Add table
Add a link
Reference in a new issue