Skip to content

Commit c3563a5

Browse files
Merge pull request #99 from ayushsharma82/dev
v2.0.7
2 parents df33050 + 4a60f7c commit c3563a5

File tree

8 files changed

+97
-64
lines changed

8 files changed

+97
-64
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ on:
77
- "/keywords.txt"
88
- "/library.json"
99
- "/library.properties"
10-
- "/vue-frontend"
1110
- "/docs"
1211
pull_request:
1312
paths-ignore:
1413
- "**/**.md"
1514
- "/keywords.txt"
1615
- "/library.json"
1716
- "/library.properties"
18-
- "/vue-frontend"
1917
- "/docs"
2018

19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
21+
cancel-in-progress: true
22+
2123
jobs:
2224
arduino:
2325
name: arduino ${{ matrix.name }}
@@ -58,13 +60,13 @@ jobs:
5860
run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }}
5961

6062
- name: Install AsyncTCP
61-
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/AsyncTCP#v3.2.3
63+
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/AsyncTCP#v3.2.5
6264

6365
- name: Install ESPAsyncTCP
6466
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/esphome-ESPAsyncTCP#v2.0.0
6567

6668
- name: Install ESPAsyncWebServer
67-
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/ESPAsyncWebServer#v3.1.1
69+
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/ESPAsyncWebServer#v3.2.4
6870

6971
- name: Build Demo
7072
run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Demo/Demo.ino"
@@ -79,61 +81,63 @@ jobs:
7981
run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/HighPerf/HighPerf.ino"
8082

8183
platformio:
82-
name: pio ${{ matrix.name }}
84+
name: "pio:${{ matrix.env }}:${{ matrix.board }}"
8385
runs-on: ubuntu-latest
8486
strategy:
8587
fail-fast: false
8688
matrix:
8789
include:
88-
- name: esp32dev|arduino
90+
- env: ci-arduino-2
8991
board: esp32dev
90-
platform: espressif32
91-
opts: "--project-option 'lib_compat_mode = strict'"
92-
- name: esp32dev|arduino-2
93-
board: esp32dev
94-
95-
opts: "--project-option 'lib_compat_mode = strict'"
96-
- name: esp32dev|arduino-3
97-
board: esp32dev
98-
platform: espressif32
99-
opts: "--project-option 'lib_compat_mode = strict' --project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.3, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.3/esp32-arduino-libs-3.0.3.zip'"
100-
- name: esp32-s3-devkitc-1|arduino
92+
- env: ci-arduino-2
10193
board: esp32-s3-devkitc-1
102-
platform: espressif32
103-
opts: "--project-option 'lib_compat_mode = strict'"
104-
- name: esp32-s3-devkitc-1|arduino-2
94+
95+
- env: ci-arduino-3
96+
board: esp32dev
97+
- env: ci-arduino-3
10598
board: esp32-s3-devkitc-1
106-
107-
opts: "--project-option 'lib_compat_mode = strict'"
108-
- name: esp32-s3-devkitc-1|arduino-3
99+
- env: ci-arduino-3
100+
board: esp32-c6-devkitc-1
101+
102+
- env: ci-arduino-310rc1
103+
board: esp32dev
104+
- env: ci-arduino-310rc1
109105
board: esp32-s3-devkitc-1
110-
platform: espressif32
111-
opts: "--project-option 'lib_compat_mode = strict' --project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.3, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.3/esp32-arduino-libs-3.0.3.zip'"
112-
- name: huzzah|espressif8266
106+
- env: ci-arduino-310rc1
107+
board: esp32-c6-devkitc-1
108+
109+
- env: ci-esp8266
113110
board: huzzah
114-
platform: espressif8266
115-
opts: "--project-option 'lib_compat_mode = strict'"
111+
- env: ci-esp8266
112+
board: d1_mini
116113
steps:
117-
- uses: actions/checkout@v4
118-
- name: Set up cache
114+
- name: Checkout
115+
uses: actions/checkout@v4
116+
117+
- name: Cache PlatformIO
119118
uses: actions/cache@v4
120119
with:
120+
key: ${{ runner.os }}-pio
121121
path: |
122-
~/.platformio
123122
~/.cache/pip
124-
key: ${{ matrix.name }}
125-
- uses: actions/setup-python@v5
123+
~/.platformio
124+
125+
- name: Python
126+
uses: actions/setup-python@v5
126127
with:
127128
python-version: "3.x"
128-
- run: pip install platformio
129-
- run: platformio platform install ${{ matrix.platform }}
130-
131-
- run: platformio ci "examples/Demo/Demo.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
132-
- run: platformio ci "examples/Demo_AP/Demo_AP.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
133-
- run: platformio ci "examples/Logging/Logging.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
134-
- run: platformio ci "examples/HighPerf/HighPerf.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
135-
136-
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" platformio ci "examples/Demo/Demo.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
137-
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" platformio ci "examples/Demo_AP/Demo_AP.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
138-
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" platformio ci "examples/Logging/Logging.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
139-
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" platformio ci "examples/HighPerf/HighPerf.ino" -l '.' -b ${{ matrix.board }} ${{ matrix.opts }}
129+
130+
- name: Build
131+
run: |
132+
python -m pip install --upgrade pip
133+
pip install --upgrade platformio
134+
135+
- run: PLATFORMIO_SRC_DIR="examples/Demo" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
136+
- run: PLATFORMIO_SRC_DIR="examples/Demo_AP" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
137+
- run: PLATFORMIO_SRC_DIR="examples/Logging" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
138+
- run: PLATFORMIO_SRC_DIR="examples/HighPerf" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
139+
140+
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/Demo" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
141+
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/Demo_AP" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
142+
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/Logging" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
143+
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/HighPerf" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
-49.6 KB
Binary file not shown.

docs/preview.png

-719 Bytes
Loading

examples/HighPerf/HighPerf.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ void setup() {
5050
}
5151

5252
void loop() {
53+
#ifdef ESP8266
54+
if (millis() - last > 500) {
55+
#else
5356
if (millis() - last > 50) {
57+
#endif
5458
count++;
5559
long r = random(10, 250) + 15;
5660
String buffer;

library.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
"maintainer": true
1616
}
1717
],
18-
"version": "2.0.6",
18+
"version": "2.0.7",
1919
"frameworks": "arduino",
2020
"platforms": ["espressif8266", "espressif32"],
2121
"dependencies": [
2222
{
2323
"owner": "mathieucarbou",
2424
"name": "ESPAsyncWebServer",
25-
"version": "^3.1.1",
25+
"version": "^3.2.4",
2626
"platforms": ["espressif8266", "espressif32"]
2727
}
2828
]

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=WebSerial
2-
version=2.0.6
2+
version=2.0.7
33
author=Ayush Sharma
44
category=Communication
55
maintainer=Ayush Sharma <[email protected]>

platformio.ini

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,61 @@ build_flags =
99
-D WS_MAX_QUEUED_MESSAGES=128
1010
-D WSL_HIGH_PERF
1111
lib_deps =
12-
mathieucarbou/AsyncTCP@^3.2.3
13-
mathieucarbou/ESPAsyncWebServer@^3.1.1
12+
mathieucarbou/AsyncTCP@^3.2.5
13+
mathieucarbou/ESPAsyncWebServer@^3.2.4
14+
lib_compat_mode = strict
15+
lib_ldf_mode = chain
1416
upload_protocol = esptool
1517
monitor_speed = 115200
1618
monitor_filters = esp32_exception_decoder, log2file
1719

1820
[platformio]
21+
default_envs = arduino-2, arduino-3, arduino-310rc1, esp8266
1922
lib_dir = .
2023
; src_dir = examples/Demo
2124
; src_dir = examples/Demo_AP
22-
; src_dir = examples/HighPerf
23-
src_dir = examples/Logging
24-
25-
[env:arduino]
26-
platform = espressif32
27-
board = esp32-s3-devkitc-1
25+
src_dir = examples/HighPerf
26+
; src_dir = examples/Logging
2827

2928
[env:arduino-2]
30-
platform = espressif32@6.7.0
29+
platform = espressif32@6.8.1
3130
board = esp32-s3-devkitc-1
3231

3332
[env:arduino-3]
34-
platform = espressif32
35-
platform_packages=
36-
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.3
37-
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.3/esp32-arduino-libs-3.0.3.zip
33+
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip
34+
board = esp32-s3-devkitc-1
35+
; board = esp32-c6-devkitc-1
36+
37+
[env:arduino-310rc1]
38+
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.10%%2Brc1/platform-espressif32.zip
3839
board = esp32-s3-devkitc-1
39-
; board = esp32dev
40+
; board = esp32-c6-devkitc-1
4041

4142
[env:esp8266]
4243
platform = espressif8266
4344
board = huzzah
45+
; board = d1_mini
46+
lib_deps =
47+
mathieucarbou/ESPAsyncWebServer@^3.2.4
48+
esphome/ESPAsyncTCP-esphome@^2.0.0
49+
50+
; CI
51+
52+
[env:ci-arduino-2]
53+
54+
board = ${sysenv.PIO_BOARD}
55+
56+
[env:ci-arduino-3]
57+
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip
58+
board = ${sysenv.PIO_BOARD}
59+
60+
[env:ci-arduino-310rc1]
61+
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.10%%2Brc1/platform-espressif32.zip
62+
board = ${sysenv.PIO_BOARD}
63+
64+
[env:ci-esp8266]
65+
platform = espressif8266
66+
board = ${sysenv.PIO_BOARD}
4467
lib_deps =
45-
mathieucarbou/ESP Async WebServer@^3.1.1
46-
esphome/ESPAsyncTCP-esphome@^2.0.0
68+
mathieucarbou/ESPAsyncWebServer@^3.2.4
69+
esphome/ESPAsyncTCP-esphome@^2.0.0

src/WebSerial.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#include "wslp.h"
44

5+
#include <assert.h>
6+
57
// DO NOT change magic bytes
68
#define WSL_MAGIC_BYTE_1 0xAB
79
#define WSL_MAGIC_BYTE_2 0xCD

0 commit comments

Comments
 (0)