From 308bb47e285bb1062c0cb20f2d285d5fb484f3c3 Mon Sep 17 00:00:00 2001 From: jake-is-ESD-protected Date: Fri, 21 Nov 2025 16:22:15 +0100 Subject: [PATCH 1/4] fix: format float declaration --- lib/utils/utils.h | 2 ++ platformio.ini | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/utils/utils.h b/lib/utils/utils.h index 3e62d70..3aa806c 100644 --- a/lib/utils/utils.h +++ b/lib/utils/utils.h @@ -4,6 +4,8 @@ extern "C" { #include +void formatFloat(float value, uint8_t decimal_places, char *out_str); + #ifdef __cplusplus } #endif diff --git a/platformio.ini b/platformio.ini index ff8e477..45d8db1 100644 --- a/platformio.ini +++ b/platformio.ini @@ -123,6 +123,7 @@ extends = _env:nucleol432kc-cube lib_ignore = ${_env_base.lib_ignore} !lib/port_stereo_spl_meter_stm32 + !lib/utils build_src_filter = + ; --- Stereo SPL Meter --- From 958b00508e7438d7074ae957370a24a980ac34bc Mon Sep 17 00:00:00 2001 From: jake-is-ESD-protected Date: Tue, 21 Apr 2026 17:00:02 +0200 Subject: [PATCH 2/4] fix: move to new jescore version --- platformio.ini | 25 ++++++++++++++++++++++++- src/fsm_cli_arduino.cpp | 2 +- src/hello_world_arduino.cpp | 4 ++-- src/hello_world_nucleol432kc.c | 4 ++-- src/stereo_spl_meter_nucleol432kc.c | 4 ++-- src/sync_async_arduino.cpp | 4 ++-- 6 files changed, 33 insertions(+), 10 deletions(-) diff --git a/platformio.ini b/platformio.ini index 45d8db1..6796578 100644 --- a/platformio.ini +++ b/platformio.ini @@ -5,7 +5,7 @@ upload_speed = 921600 monitor_speed = 115200 build_src_filter = -<*> lib_deps = - jescore + jescore@^2.3.0 lib_ignore = lib/* ; ---------- BASE ENV ---------- @@ -13,6 +13,7 @@ lib_ignore = lib/* [_env:esp32] extends = _env_base platform = espressif32 +platform_packages = tool-esptoolpy@~1.40501.0 [_env:esp32-arduino] extends = _env:esp32 @@ -85,6 +86,28 @@ extends = _env:esp32-nodemcu-arduino build_src_filter = + ; --- Hello World --- +; +++ Multi UART Streamer +++ +[env:multi_uart_streamer_esp32-c3-arduino] +extends = _env:esp32-c3-arduino +build_src_filter = + +lib_deps = jesdev-io/jescore@^2.2.3 + +[env:multi_uart_streamer_esp32-az-delivery-devkit-v4-arduino] +extends = _env:esp32-az-delivery-devkit-v4-arduino +build_src_filter = + +lib_deps = jesdev-io/jescore@^2.2.3 + +[env:multi_uart_streamer_esp32-wrover-kit-arduino] +extends = _env:esp32-wrover-kit-arduino +build_src_filter = + +lib_deps = jesdev-io/jescore@^2.2.3 + +[env:multi_uart_streamer_esp32-nodemcu-arduino] +extends = _env:esp32-nodemcu-arduino +build_src_filter = + +lib_deps = jesdev-io/jescore@^2.2.3 +; --- Multi UART Streamer --- + ; +++ Sync-Async +++ [env:sync_async_esp32-c3-arduino] extends = _env:esp32-c3-arduino diff --git a/src/fsm_cli_arduino.cpp b/src/fsm_cli_arduino.cpp index 4428b19..3431459 100644 --- a/src/fsm_cli_arduino.cpp +++ b/src/fsm_cli_arduino.cpp @@ -54,7 +54,7 @@ void setup() { jes_init(); pinMode(LED_PIN, OUTPUT); analogWrite(LED_PIN, 255); - jes_register_job("lights", 2048, 1, lights, false); + jes_register_job("lights", 2048, 1, lights, 0, 0); } void loop() { diff --git a/src/hello_world_arduino.cpp b/src/hello_world_arduino.cpp index afe55f2..1bed4b3 100644 --- a/src/hello_world_arduino.cpp +++ b/src/hello_world_arduino.cpp @@ -22,8 +22,8 @@ void hello(void* p){ void setup(){ pinMode(LED_PIN, OUTPUT); jes_init(); - jes_register_and_launch_job("blink", 1024, 1, blink, 1); - jes_register_job("hello", 1024, 1, hello, 0); + jes_register_and_launch_job("blink", 1024, 1, blink, 1, 0); + jes_register_job("hello", 1024, 1, hello, 0, 0); } void loop(){ diff --git a/src/hello_world_nucleol432kc.c b/src/hello_world_nucleol432kc.c index 400388f..6a76d06 100644 --- a/src/hello_world_nucleol432kc.c +++ b/src/hello_world_nucleol432kc.c @@ -28,8 +28,8 @@ int main(void){ MX_GPIO_Init(); jes_init(); - jes_register_and_launch_job("blink", 256, 1, blink, 1); - jes_register_job("hello", 256, 1, hello, 0); + jes_register_and_launch_job("blink", 256, 1, blink, 1, 0); + jes_register_job("hello", 256, 1, hello, 0, 0); jes_dispatch(); } diff --git a/src/stereo_spl_meter_nucleol432kc.c b/src/stereo_spl_meter_nucleol432kc.c index d65a528..98f1754 100644 --- a/src/stereo_spl_meter_nucleol432kc.c +++ b/src/stereo_spl_meter_nucleol432kc.c @@ -159,8 +159,8 @@ void audio_controller(void* p) { /// @param p `jescore` job pointer. void port_setup(){ jes_init(); - jes_register_and_launch_job("_audio", 2048, 1, audio_loop, 1); - jes_register_job("audio", 1024, 1, audio_controller, 0); + jes_register_and_launch_job("_audio", 2048, 1, audio_loop, 1, 1); + jes_register_job("audio", 1024, 1, audio_controller, 0, 1); LED_ENABLE_PORT(); HAL_StatusTypeDef stat; if ((stat = HAL_SAI_Receive_DMA(&hsai_BlockA1, (uint8_t*)mem, BLOCK_SIZE*2)) != HAL_OK){ diff --git a/src/sync_async_arduino.cpp b/src/sync_async_arduino.cpp index ef56758..acf5e79 100644 --- a/src/sync_async_arduino.cpp +++ b/src/sync_async_arduino.cpp @@ -42,8 +42,8 @@ void blink_switch(void* p){ void setup() { jes_init(); pinMode(LED_PIN, OUTPUT); - jes_register_job("switch", 2048, 1, blink_switch, false); - jes_register_and_launch_job("blink", 2048, 1, blink_forever, true); + jes_register_job("switch", 2048, 1, blink_switch, 0, 1); + jes_register_and_launch_job("blink", 2048, 1, blink_forever, 1, 1); } void loop() { From 9a3b03bcb5be5dff707113282ba5d984cd7ea86b Mon Sep 17 00:00:00 2001 From: jake-is-ESD-protected Date: Tue, 21 Apr 2026 17:05:16 +0200 Subject: [PATCH 3/4] add: multi UART streamer example --- src/multi_uart_streamer_arduino.cpp | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/multi_uart_streamer_arduino.cpp diff --git a/src/multi_uart_streamer_arduino.cpp b/src/multi_uart_streamer_arduino.cpp new file mode 100644 index 0000000..bb3a5c0 --- /dev/null +++ b/src/multi_uart_streamer_arduino.cpp @@ -0,0 +1,55 @@ +/* +This code demonstrates how jescore can split UART messages +originating from different jobs. This is very useful for +debugging and low rate cross-platform data transfer. + +jescore CLI: +- Call `jescore -l` to see all jobs printing +- Call `jescore -l --filter [printer1]` to just see the output + of the job "printer1" +- Call `jescore -l --filter [printer1, printer2]` to see the + output of both "printer1" and "printer2" +- Call `jescore hello` to see the response of the "hello" job, + where the name of the job is directly applied as filter +*/ + +#include +#include + +void printer1(void* p){ + while(1){ + jes_print("Hello from printer 1!\n\r"); + jes_delay_job_ms(1000); + } +} + +void printer2(void* p){ + while(1){ + jes_print("Hello from printer 2!\n\r"); + jes_delay_job_ms(2000); + } +} + +void printer3(void* p){ + while(1){ + jes_print("Hello from printer 3!\n\r"); + jes_delay_job_ms(3000); + } +} + +void printer_on_demand(void* p){ + jes_print("Hello on demand!\n\r"); +} + + +void setup() { + jes_init(); + jes_register_and_launch_job("printer1", 2048, 1, printer1, 1, 1); + jes_register_and_launch_job("printer2", 2048, 1, printer2, 1, 1); + jes_register_and_launch_job("printer3", 2048, 1, printer3, 1, 1); + jes_register_job("hello", 2048, 1, printer_on_demand, 0, 1); +} + +void loop() { + +} From 4cbc53fe052b022be92ef172aae06ef5d61e9d86 Mon Sep 17 00:00:00 2001 From: jake-is-ESD-protected Date: Tue, 21 Apr 2026 17:16:13 +0200 Subject: [PATCH 4/4] log: changes --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ee88bc..363fec3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 2026-04-21 + +### Added +- 🛣️ Multi UART streamer example + +### Changed +- 🔆 Main `jescore` version 2.3.0 +- ⛏️ Set `tool-esptoolpy` to version 1.40501.0 because the newest is broken (?) + ## 2025-11-21 ### Added