Browse Source

Merge pull request #293 from SandnerSoft/development03

ESP32 build corrected
pull/295/head
lumapu 2 years ago
committed by GitHub
parent
commit
797cc0c22f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      tools/esp8266/platformio.ini
  2. 2
      tools/esp8266/web.cpp
  3. 5
      tools/esp8266/web.h
  4. 4
      tools/esp8266/webApi.h

16
tools/esp8266/platformio.ini

@ -36,8 +36,6 @@ lib_deps =
paulstoffregen/Time@^1.6.1
knolleary/PubSubClient@^2.8
bblanchon/ArduinoJson@^6.19.4
me-no-dev/ESP Async WebServer@^1.2.3
me-no-dev/ESPAsyncTCP@^1.2.2
;esp8266/DNSServer@1.1.0
;esp8266/EEPROM@^1.0
;esp8266/ESP8266WiFi@^1.0
@ -49,6 +47,9 @@ platform = espressif8266
board = esp12e
board_build.f_cpu = 80000000L
build_flags = -D RELEASE
lib_deps = ${env.lib_deps}
me-no-dev/ESP Async WebServer@^1.2.3
me-no-dev/ESPAsyncTCP@^1.2.2
monitor_filters =
;default ; Remove typical terminal control codes from input
time ; Add timestamp with milliseconds for each new line
@ -60,6 +61,9 @@ board = esp12e
board_build.f_cpu = 80000000L
build_flags = -DDEBUG_LEVEL=DBG_DEBUG -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_OOM -DDEBUG_ESP_PORT=Serial
build_type = debug
lib_deps = ${env.lib_deps}
me-no-dev/ESP Async WebServer@^1.2.3
me-no-dev/ESPAsyncTCP@^1.2.2
monitor_filters =
;default ; Remove typical terminal control codes from input
time ; Add timestamp with milliseconds for each new line
@ -69,6 +73,10 @@ monitor_filters =
platform = espressif32
board = lolin_d32
build_flags = -D RELEASE
lib_deps = ${env.lib_deps}
https://github.com/me-no-dev/ESPAsyncWebServer.git
me-no-dev/AsyncTCP@^1.1.1
upload_port = /dev/cu.SLAB_USBtoUART
monitor_filters =
;default ; Remove typical terminal control codes from input
time ; Add timestamp with milliseconds for each new line
@ -79,6 +87,10 @@ platform = espressif32
board = lolin_d32
build_flags = -DDEBUG_LEVEL=DBG_DEBUG -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_OOM -DDEBUG_ESP_PORT=Serial
build_type = debug
lib_deps = ${env.lib_deps}
https://github.com/me-no-dev/ESPAsyncWebServer.git
me-no-dev/AsyncTCP@^1.1.1
upload_port = /dev/cu.SLAB_USBtoUART
monitor_filters =
;default ; Remove typical terminal control codes from input
time ; Add timestamp with milliseconds for each new line

2
tools/esp8266/web.cpp

@ -431,7 +431,9 @@ void web::showUpdate(AsyncWebServerRequest *request) {
void web::showUpdate2(AsyncWebServerRequest *request, String filename, size_t index, uint8_t *data, size_t len, bool final) {
if(!index) {
Serial.printf("Update Start: %s\n", filename.c_str());
#ifndef ESP32
Update.runAsync(true);
#endif
if(!Update.begin((ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000)) {
Update.printError(Serial);
}

5
tools/esp8266/web.h

@ -7,7 +7,12 @@
#define __WEB_H__
#include "dbg.h"
#ifdef ESP32
#include "AsyncTCP.h"
#include "Update.h"
#else
#include "ESPAsyncTCP.h"
#endif
#include "ESPAsyncWebServer.h"
#include "app.h"
#include "webApi.h"

4
tools/esp8266/webApi.h

@ -2,7 +2,11 @@
#define __WEB_API_H__
#include "dbg.h"
#ifdef ESP32
#include "AsyncTCP.h"
#else
#include "ESPAsyncTCP.h"
#endif
#include "ESPAsyncWebServer.h"
#include "AsyncJson.h"
#include "app.h"

Loading…
Cancel
Save