velxio/backend/app
David Montero d6442180b0 fix(esp32_worker): skip per-byte log+emit for I2CWriteSink display drivers
A 1024-byte oled.show() writevto generates ~1025 calls into
_on_i2c_event, one per byte. The previous code called _log (stderr
write+flush) AND _emit (stdout JSON write+flush) for every event,
saturating the worker subprocess's stdout pipe. The QEMU thread blocks
on the synchronous write, the firmware's ESP-IDF i2c_master ISR
re-enters before the previous one finished, and the Interrupt watchdog
trips on CPU1 with a "Guru Meditation Error: Interrupt wdt timeout"
panic on the second consecutive oled.show() call.

I2CWriteSink already buffers writes internally and emits a single
i2c_transaction event on FINISH, so the per-byte log+emit was pure
overhead with no observability value for display drivers (SSD1306,
PCF8574). Keep them for everything else.

Verified end-to-end via chrome devtools MCP:
- Test minimal (init + 1 explicit show): markers OK, no panic
- Loop test (10x oled.show() + sleep(0.5)): DONE_LOOP, no panic
2026-05-23 22:26:19 +02:00
..
api feat(chips): C-to-Z80 compile via SDCC + LED chaser example 2026-05-19 00:31:10 -03:00
core Refactor code structure for improved readability and maintainability 2026-05-18 21:50:45 -03:00
database
mcp
models
schemas
services fix(esp32_worker): skip per-byte log+emit for I2CWriteSink display drivers 2026-05-23 22:26:19 +02:00
utils
__init__.py
main.py feat(chips): programmable retro CPU chips with external ROM 2026-05-18 23:38:18 -03:00