From 83080a9e63d66568cc3fb7fc7e184a1031b8098f Mon Sep 17 00:00:00 2001 From: TD-er Date: Sat, 19 Oct 2024 00:40:56 +0200 Subject: [PATCH 1/3] [WSL2] Add simple script to set permissions for USB to serial in WSL2 --- tools/set_tty_permissions_WSL2.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 tools/set_tty_permissions_WSL2.sh diff --git a/tools/set_tty_permissions_WSL2.sh b/tools/set_tty_permissions_WSL2.sh new file mode 100755 index 0000000000..d5c6ecbed9 --- /dev/null +++ b/tools/set_tty_permissions_WSL2.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +sudo modprobe usbserial +sudo modprobe ch341 +sudo modprobe cp210x +sudo modprobe ftdi_sio + + +sudo chmod 666 /dev/ttyACM* +sudo chmod 666 /dev/ttyUSB* \ No newline at end of file From 81680971cf45bd3441c661f8dcf03f33a3e81fac Mon Sep 17 00:00:00 2001 From: TD-er Date: Fri, 25 Oct 2024 17:11:01 +0200 Subject: [PATCH 2/3] [ESP-IDF] Switch to latest ESP-IDF/ESP32-Arduino 3.0.7 --- platformio_core_defs.ini | 6 +++--- platformio_esp32_solo1.ini | 4 ++-- src/src/WebServer/TimingStats.cpp | 23 +++++++++++++++-------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/platformio_core_defs.ini b/platformio_core_defs.ini index 3d54acfd68..1327c044d3 100644 --- a/platformio_core_defs.ini +++ b/platformio_core_defs.ini @@ -169,7 +169,7 @@ extra_scripts = ${esp82xx_common.extra_scripts} ; For MUSTFIX_CLIENT_TIMEOUT_IN_SECONDS See: https://github.com/espressif/arduino-esp32/pull/6676 [core_esp32_IDF5_1_4__3_0_5_SPIFFS] platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.09.10/platform-espressif32.zip -platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/2962/framework-arduinoespressif32-all-release_v5.1-33fbade.zip +platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/3110/framework-arduinoespressif32-all-release_v5.1-632e0c2.zip build_flags = -DESP32_STAGE -DESP_IDF_VERSION_MAJOR=5 -DLIBRARIES_NO_LOG=1 @@ -197,8 +197,8 @@ lib_extra_dirs = ; ESP_IDF 5.3.1 [core_esp32_IDF5_3_1__3_0_5_LittleFS] -platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF53 -platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/3019/framework-arduinoespressif32-all-release_v5.3-98aecc7e.zip +platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.10.31/platform-espressif32.zip +platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/3112/framework-arduinoespressif32-all-release_v5.3-1c74f314.zip build_flags = -DESP32_STAGE -DESP_IDF_VERSION_MAJOR=5 -DLIBRARIES_NO_LOG=1 diff --git a/platformio_esp32_solo1.ini b/platformio_esp32_solo1.ini index 9854619dc8..990dc02a23 100644 --- a/platformio_esp32_solo1.ini +++ b/platformio_esp32_solo1.ini @@ -2,8 +2,8 @@ ; IDF 5.3.1 [esp32_solo1_common_LittleFS] extends = esp32_base_idf5 -platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF53 -platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/3020/framework-arduinoespressif32-solo1-release_v5.3-98aecc7e.zip +platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.10.31/platform-espressif32.zip +platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/3113/framework-arduinoespressif32-solo1-release_v5.3-1c74f314.zip build_flags = ${esp32_base_idf5.build_flags} -DFEATURE_ARDUINO_OTA=1 -DUSE_LITTLEFS diff --git a/src/src/WebServer/TimingStats.cpp b/src/src/WebServer/TimingStats.cpp index 70de31167f..478795bc36 100644 --- a/src/src/WebServer/TimingStats.cpp +++ b/src/src/WebServer/TimingStats.cpp @@ -28,14 +28,21 @@ void handle_timingstats() { sendHeadandTail_stdtemplate(_HEAD); html_table_class_multirow(); html_TR(); - html_table_header(F("Description")); - html_table_header(F("Function")); - html_table_header(F("#calls")); - html_table_header(F("call/sec")); - html_table_header(F("duty (%)")); - html_table_header(F("min (ms)")); - html_table_header(F("Avg (ms)")); - html_table_header(F("max (ms)")); + { + const __FlashStringHelper * headers[] = { + F("Description"), + F("Function"), + F("#calls"), + F("call/sec"), + F("duty (%)"), + F("min (ms)"), + F("Avg (ms)"), + F("max (ms)")}; + for (unsigned int i = 0; i < NR_ELEMENTS(headers); ++i) { + html_table_header(headers[i]); + } + } + const long timeSinceLastReset = stream_timing_statistics(true); html_end_table(); From b4b381cf31963d330abd3380f175543a297feccd Mon Sep 17 00:00:00 2001 From: TD-er Date: Mon, 28 Oct 2024 15:42:59 +0100 Subject: [PATCH 3/3] Fix custom build with <2 included plugins (#5150) Fixes: #5150 --- src/src/Helpers/_Plugin_init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src/Helpers/_Plugin_init.cpp b/src/src/Helpers/_Plugin_init.cpp index 6669335b38..7c518502b0 100644 --- a/src/src/Helpers/_Plugin_init.cpp +++ b/src/src/Helpers/_Plugin_init.cpp @@ -2092,7 +2092,7 @@ constexpr size_t DeviceIndex_to_Plugin_id_size = NR_ELEMENTS(DeviceIndex_to_Plug constexpr size_t Lowest_Plugin_id = DeviceIndex_to_Plugin_id_size == 0 ? 0 : DeviceIndex_to_Plugin_id[0]; // Highest plugin ID included in the build -constexpr size_t Highest_Plugin_id = DeviceIndex_to_Plugin_id_size > 1 ? DeviceIndex_to_Plugin_id[DeviceIndex_to_Plugin_id_size - 1] : 0; +constexpr size_t Highest_Plugin_id = DeviceIndex_to_Plugin_id_size > 0 ? DeviceIndex_to_Plugin_id[DeviceIndex_to_Plugin_id_size - 1] : 0; // Array size including index of highest plugin ID. constexpr size_t Plugin_id_to_DeviceIndex_size = Highest_Plugin_id + 1 - Lowest_Plugin_id;