mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
fix: print each log line whole
The Arduino core's log_printf() has its UART lock commented out and writes with ets_printf(), so lines logged at the same time from async_tcp and loop() came out interleaved character by character. It also formats short lines into one static buffer shared by every task. Wrap log_printf at link time and hold a mutex around the core's log_printfv(). It never blocks before the scheduler runs, in an ISR or in a critical section, and waits at most 50ms before printing anyway. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
dd47c04905
commit
6b19d24eb4
2 changed files with 38 additions and 0 deletions
|
|
@ -37,6 +37,8 @@ build_flags =
|
|||
-DCONFIG_ESP_COREDUMP_CHECKSUM_CRC32=1
|
||||
-DCONFIG_ESP_TASK_WDT_PANIC=1
|
||||
-DCONFIG_ESP_COREDUMP_DECODE_INFO=1
|
||||
; Route log_printf through src/LogLock.cpp so lines from both cores don't interleave.
|
||||
-Wl,--wrap=log_printf
|
||||
monitor_speed = 115200
|
||||
monitor_filters =
|
||||
time
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue