move to asyn server (to get websockets)

This commit is contained in:
Torsten Ruger
2021-06-29 11:30:47 +03:00
parent 5a8d807e18
commit e28df2e41a
7 changed files with 75 additions and 97 deletions

View File

@ -21,27 +21,22 @@ protected:
float minute_in = 0 ;
float minute_out = 0 ;
int minute_counter = 0;
int week_counter = 0;
int month_counter = 0;
void add_month(int from ) ;
public:
float week_in[WEEK];
float week_out[WEEK];
float month_in[MONTH];
float month_out[MONTH];
int minute_counter = 0;
int week_counter = 0;
int month_counter = 0;
String one_week( float[] );
String one_month( float[] );
void add_month(int from ) ;
public:
void add_week(float in , float out) ;
void add(float in , float out) ;
String week_data();
String month_data();
};

View File

@ -2,7 +2,6 @@
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
void ota_setup(const char* name);

View File

@ -1,7 +1,8 @@
#include <ESP8266WebServer.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <LittleFS.h>
static ESP8266WebServer server(80);
static AsyncWebServer server(80);
void server_setup();
void server_loop();