Skip to content

Commit

Permalink
load espReact in setup
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Sep 5, 2023
1 parent cfa0744 commit 2f7fb58
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 98 deletions.
91 changes: 0 additions & 91 deletions pio_local.ini_

This file was deleted.

14 changes: 8 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
#include <ESP8266React.h>

AsyncWebServer webServer(80);
ESP8266React esp8266React(&webServer, &LittleFS);
ESP8266React * esp8266React;
//ESP8266React esp8266React(&webServer, &LittleFS);

void init_eth() {
#if CONFIG_IDF_TARGET_ESP32
Expand Down Expand Up @@ -47,14 +48,15 @@ void init_eth() {

void setup() {
Serial.begin(19200);
if (!LittleFS.begin(true)) {
return;
}
esp8266React.begin();
LittleFS.begin(true);
// esp8266React.begin();
esp8266React = new ESP8266React(&webServer, &LittleFS);
esp8266React->begin();
init_eth();
webServer.begin();
}

void loop() {
esp8266React.loop(); // web services
// esp8266React.loop(); // web services
esp8266React->loop(); // web services
}
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define EMSESP_APP_VERSION "3.5.1_loader"
#define EMSESP_APP_VERSION "3.5.1_loader_g"

#if CONFIG_IDF_TARGET_ESP32C3
#define EMSESP_PLATFORM "ESP32-C3";
Expand Down

0 comments on commit 2f7fb58

Please sign in to comment.