From 3fbbef421352d7794bea9694a5e24ea629955cb1 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Thu, 3 Oct 2024 20:49:22 +0200 Subject: [PATCH] Little cleanups and added partition file --- .github/ISSUE_TEMPLATE/bug_report.md | 13 +++++-------- .github/ISSUE_TEMPLATE/question.md | 5 +---- examples/SimpleServer/SimpleServer.ino | 11 +++++++++-- partitions-4MB.csv | 7 +++++++ platformio.ini | 2 ++ 5 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 partitions-4MB.csv diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index de20b90..19fe479 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -3,8 +3,7 @@ name: Bug report about: Create a report to help us improve title: "[BUG]" labels: triage -assignees: '' - +assignees: "" --- **Please make sure to go through the recommendations before opening a bug report:** @@ -13,15 +12,13 @@ assignees: '' **Description** -A clear and concise description of what the bug is. +_A clear and concise description of what the bug is._ -**Board** +**Link:** _A link to your source code where the issue happens_ -esp32dev, esp32s3, etc +**Board**: _esp32dev, esp32s3, ?_ -**Ethernet adapter used ?** - -If yes, please specify which one +**Ethernet adapter used ?** _If yes, please specify which one_ **Stack trace** diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index 634179c..7f62845 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -3,8 +3,5 @@ name: Question about: Describe your question title: "[Q]" labels: question -assignees: '' - +assignees: "" --- - - diff --git a/examples/SimpleServer/SimpleServer.ino b/examples/SimpleServer/SimpleServer.ino index da58072..dbb1e2f 100644 --- a/examples/SimpleServer/SimpleServer.ino +++ b/examples/SimpleServer/SimpleServer.ino @@ -123,7 +123,11 @@ void setup() { Serial.begin(115200); - assert(LittleFS.begin()); +#ifdef ESP32 + LittleFS.begin(true); +#else + LittleFS.begin(); +#endif if (!LittleFS.exists("/index.txt")) { File f = LittleFS.open("/index.txt", "w"); @@ -478,7 +482,10 @@ void setup() { } }); + // go to http://192.168.4.1/sse server.addHandler(&events); + + // Run: websocat ws://192.168.4.1/ws server.addHandler(&ws); #if ASYNC_JSON_SUPPORT == 1 @@ -507,7 +514,7 @@ void loop() { ws.printfAll("kp%.4f", (10.0 / 3.0)); // ws.getClients for (auto& client : ws.getClients()) { - client.text("kp%.4f", (10.0 / 3.0)); + client.printf("kp%.4f", (10.0 / 3.0)); } lastWS = millis(); } diff --git a/partitions-4MB.csv b/partitions-4MB.csv new file mode 100644 index 0000000..75efc35 --- /dev/null +++ b/partitions-4MB.csv @@ -0,0 +1,7 @@ +# Name ,Type ,SubType ,Offset ,Size ,Flags +nvs ,data ,nvs ,36K ,20K , +otadata ,data ,ota ,56K ,8K , +app0 ,app ,ota_0 ,64K ,1856K , +app1 ,app ,ota_1 ,1920K ,1856K , +spiffs ,data ,spiffs ,3776K ,256K , +coredump ,data ,coredump ,4032K ,64K , diff --git a/platformio.ini b/platformio.ini index 80166a3..6fc7046 100644 --- a/platformio.ini +++ b/platformio.ini @@ -27,6 +27,8 @@ lib_deps = bblanchon/ArduinoJson @ 7.2.0 mathieucarbou/AsyncTCP @ 3.2.6 board = esp32dev +board_build.partitions = partitions-4MB.csv +board_build.filesystem = littlefs [env:arduino-2] platform = espressif32@6.9.0