1
0
Эх сурвалжийг харах

Commits from dev branch... (#88)

* Arduino 2

* ESP Async WebServer v3 (breaking changes in v3)
Mathieu Carbou 9 сар өмнө
parent
commit
6e2675817b

+ 8 - 8
.github/workflows/ci.yml

@@ -64,7 +64,7 @@ jobs:
         run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/esphome-ESPAsyncTCP#v2.0.0
 
       - name: Install ESPAsyncWebServer
-        run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/ESPAsyncWebServer#v2.10.4
+        run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/ESPAsyncWebServer#v3.0.2
 
       - name: Build Demo
         run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Demo/Demo.ino"
@@ -88,31 +88,31 @@ jobs:
           - name: esp32dev|arduino
             board: esp32dev
             platform: espressif32
-            opts:
+            opts: "--project-option 'lib_compat_mode = strict'"
           - name: esp32dev|arduino-2
             board: esp32dev
             platform: espressif32@6.7.0
-            opts:
+            opts: "--project-option 'lib_compat_mode = strict'"
           - name: esp32dev|arduino-3
             board: esp32dev
             platform: espressif32
-            opts: "--project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.0/esp32-arduino-libs-3.0.0.zip'"
+            opts: "--project-option 'lib_compat_mode = strict' --project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.2, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.2/esp32-arduino-libs-3.0.2.zip'"
           - name: esp32-s3-devkitc-1|arduino
             board: esp32-s3-devkitc-1
             platform: espressif32
-            opts:
+            opts: "--project-option 'lib_compat_mode = strict'"
           - name: esp32-s3-devkitc-1|arduino-2
             board: esp32-s3-devkitc-1
             platform: espressif32@6.7.0
-            opts:
+            opts: "--project-option 'lib_compat_mode = strict'"
           - name: esp32-s3-devkitc-1|arduino-3
             board: esp32-s3-devkitc-1
             platform: espressif32
-            opts: "--project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.0/esp32-arduino-libs-3.0.0.zip'"
+            opts: "--project-option 'lib_compat_mode = strict' --project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.2, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.2/esp32-arduino-libs-3.0.2.zip'"
           - name: huzzah|espressif8266
             board: huzzah
             platform: espressif8266
-            opts:
+            opts: "--project-option 'lib_compat_mode = strict'"
     steps:
       - uses: actions/checkout@v4
       - name: Set up cache

+ 1 - 1
library.json

@@ -22,7 +22,7 @@
     {
       "owner": "mathieucarbou",
       "name": "ESP Async WebServer",
-      "version": "^2.10.4",
+      "version": "^3.0.2",
       "platforms": ["espressif8266", "espressif32"]
     }
   ]

+ 4 - 4
platformio.ini

@@ -10,7 +10,7 @@ build_flags =
   -D WSL_HIGH_PERF
 lib_deps = 
   mathieucarbou/Async TCP @ ^3.1.4
-  mathieucarbou/ESP Async WebServer @ 2.10.4
+  mathieucarbou/ESP Async WebServer @ 3.0.2
 upload_protocol = esptool
 monitor_speed = 115200
 monitor_filters = esp32_exception_decoder, log2file
@@ -33,8 +33,8 @@ board = esp32-s3-devkitc-1
 [env:arduino-3]
 platform = espressif32
 platform_packages=
-  platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0
-  platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.0/esp32-arduino-libs-3.0.0.zip
+  platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.2
+  platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.2/esp32-arduino-libs-3.0.2.zip
 board = esp32-s3-devkitc-1
 ; board = esp32dev
 
@@ -42,5 +42,5 @@ board = esp32-s3-devkitc-1
 platform = espressif8266
 board = huzzah
 lib_deps = 
-  mathieucarbou/ESP Async WebServer @ 2.10.4
+  mathieucarbou/ESP Async WebServer @ 3.0.2
   esphome/ESPAsyncTCP-esphome @ 2.0.0

+ 1 - 1
src/WebSerial.cpp

@@ -59,7 +59,7 @@ void WebSerialClass::begin(AsyncWebServer *server, const char* url) {
       if(!request->authenticate(_username.c_str(), _password.c_str()))
         return request->requestAuthentication();
     }
-    AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", WEBSERIAL_HTML, sizeof(WEBSERIAL_HTML));
+    AsyncWebServerResponse *response = request->beginResponse(200, "text/html", WEBSERIAL_HTML, sizeof(WEBSERIAL_HTML));
     response->addHeader("Content-Encoding", "gzip");
     request->send(response);        
   });