Skip to content
Merged

Dev #126

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
577 commits
Select commit Hold shift + click to select a range
2ac17be
fix(usb): drive TS3USB221 mux select to route USB-C to native P4 USB
anarchyysm Aug 14, 2026
9266433
feat(usb): default USB-C to UART bridge with runtime toggle to native…
anarchyysm Aug 14, 2026
998c4cc
docs(tusb_desc): document USB-C TS3USB221 mux default and runtime toggle
anarchyysm Aug 14, 2026
1e00854
fix(display): propagate ST7789 init errors + retry instead of abort
lthiagovs Aug 14, 2026
e262dbf
fix(core): stop kernel_init aborting on NVS/display failure
lthiagovs Aug 14, 2026
23191ce
fix(console): propagate REPL + command-register errors instead of abort
lthiagovs Aug 14, 2026
1caa4f6
fix(subghz): remove ESP_ERROR_CHECK from RX/TX paths
lthiagovs Aug 14, 2026
2e91729
fix(c5): propagate c5_flasher UART init error
lthiagovs Aug 14, 2026
05d4b5a
fix(diag): guard coredump summary behind ELF-format config
lthiagovs Aug 14, 2026
63099bc
feat(diag): boot-loop detection via RTC counter, degraded mode after …
anarchyysm Aug 14, 2026
75cd4ad
docs: document boot-loop detection and degraded-mode trigger
anarchyysm Aug 14, 2026
d48bfe6
fix(ota): validate pending image locally after boot, not via disabled C5
anarchyysm Aug 14, 2026
e6bedcd
docs(ota): local post-boot validation, updated rollback and partition…
anarchyysm Aug 14, 2026
321c5de
fix(c5): add assets/storage littlefs partitions and drop P4-only char…
anarchyysm Aug 14, 2026
1122efa
refactor(c5): keep only assets (config) partition, drop storage; capt…
anarchyysm Aug 14, 2026
571f709
feat(wifi): save AP/client scans to SD on P4 (SD-only, auto on scan c…
anarchyysm Aug 14, 2026
a0881b6
refactor(c5): drop redundant local capture writes (scans/passwords/pc…
anarchyysm Aug 14, 2026
d590d51
feat(c5): enable WiFi modem sleep (esp_wifi_set_ps MIN_MODEM)
anarchyysm Aug 14, 2026
8586f98
feat(power): P4 signals device power state to C5 over bridge; C5 drop…
anarchyysm Aug 14, 2026
69f949d
perf(header): stop perpetual redraws - value-compare tint/battery, st…
anarchyysm Aug 14, 2026
d607658
feat(power): add power_manager with esp_pm DFS + light sleep gated by…
anarchyysm Aug 14, 2026
62159d8
feat(power): real BQ25896 ship mode/charge control, filtered SoC, low…
anarchyysm Aug 14, 2026
8d76143
feat(ui): screen lifecycle close hook - stop hardware/task on screen …
anarchyysm Aug 14, 2026
fed472a
feat(sd): interrupt-driven card hotplug with debounce, drop the 2Hz C…
anarchyysm Aug 14, 2026
8ff299b
fix(core): grow console_task stack and keep tos_log off the caller st…
anarchyysm Aug 14, 2026
b26d0ee
fix(log): re-entrancy guard in tos_log vprintf hook (PM logs mid-prin…
anarchyysm Aug 14, 2026
349e49a
revert(power): disable esp_pm light sleep/DFS - breaks console UART +…
anarchyysm Aug 14, 2026
cac37f9
feat(power): light sleep without DFS (pinned freq) + USB/console kept…
anarchyysm Aug 14, 2026
2356ed2
revert(power): disable light sleep again - breaks console UART RX on …
anarchyysm Aug 14, 2026
c1ad970
fix(ui): grow UI screen task stacks 4096->8192 (snprintf/printf path …
anarchyysm Aug 14, 2026
d4fef78
fix(usb): defer native USB (TinyUSB) until mux is switched to native,…
anarchyysm Aug 14, 2026
545a5d0
fix(ui): remove screen auto-dim/auto-sleep and low-battery brightness…
anarchyysm Aug 14, 2026
109988c
fix(log): drop custom SD log tee, keep only coredump; make host_link …
anarchyysm Aug 14, 2026
a7b97f9
feat(led): implement LP5816 I2C RGB driver and wire it to the LED con…
anarchyysm Aug 14, 2026
783b9ef
feat(led): add LED config (brightness + info/warning/error colors) wi…
anarchyysm Aug 14, 2026
3fd5fce
feat(led): move led signals to Service and wire info/warning/error in…
anarchyysm Aug 14, 2026
9f3e829
fix(led): make status signals a single short flash (normally off) and…
anarchyysm Aug 14, 2026
0f0cfed
fix(led): clamp brightness to 100% and channels to 255, use saturated…
anarchyysm Aug 14, 2026
e314b04
fix(led): brightness steps of 5% with 5% minimum
anarchyysm Aug 14, 2026
628c2a3
feat(led): rework LED screen into a signal config editor (per-signal …
anarchyysm Aug 14, 2026
b4697e0
feat(led): use pure magenta for purple (#FF00FF) in preset and info d…
anarchyysm Aug 14, 2026
5c9010e
feat(led): add visual signals to wifi scan/connect, C5 ping/info/sync…
anarchyysm Aug 14, 2026
3c77619
refactor(led): move signal API into Drivers/led, inject config from S…
anarchyysm Aug 14, 2026
585f5b7
feat(led): signal at service/operation level for IR, BadUSB, SubGHz, …
anarchyysm Aug 14, 2026
751973b
feat(led): signal wifi attack/monitor tools (sniffer, deauther, evil …
anarchyysm Aug 14, 2026
880b885
tweak(led): default brightness 5% and 500ms flash duration
anarchyysm Aug 14, 2026
aa7e538
tweak(led): 250ms flash duration and 10% default brightness
anarchyysm Aug 14, 2026
28deb41
feat(led): blink on SPI bridge failures (error/warning next to each E…
anarchyysm Aug 14, 2026
25d1726
fix(host_link): grow worker task stack 4096->8192 (dispatch into SPI/…
anarchyysm Aug 14, 2026
861dcff
feat(led): blink on SPI session failures (companion) next to each ESP…
anarchyysm Aug 14, 2026
e61db12
feat(led): blink info on SPI session start/stop (ESP_LOGI) in companion
anarchyysm Aug 14, 2026
4af33ca
feat(core): add graceful shutdown handler that unmounts storage on re…
lthiagovs Aug 14, 2026
8604c86
feat(ui): add reusable reboot screen component
lthiagovs Aug 14, 2026
4299e91
refactor(ui): use reboot component on P4 update screen
lthiagovs Aug 14, 2026
001dcd9
refactor(ui): use reboot component on settings reboot
lthiagovs Aug 14, 2026
edae288
refactor(ui): route safe mode reboot through reboot component
lthiagovs Aug 14, 2026
19c6a36
chore(ui): fix stale SD card-detect comment in header
lthiagovs Aug 14, 2026
cc9b074
chore(core): drop resolved item 31 TODO in sys_monitor
lthiagovs Aug 14, 2026
53fdf18
feat(ui): swap dropdown ECO badge for a graceful reboot action
lthiagovs Aug 15, 2026
499d6ee
perf(ui): collapse header status timers into one slow poll, animate o…
lthiagovs Aug 15, 2026
445446c
feat(core): init battery service and audio i2s at boot
lthiagovs Aug 15, 2026
9ee6a62
refactor(ui): queue haptic and sound feedback events
lthiagovs Aug 15, 2026
3029f7f
refactor(audio): rework i2s audio driver
lthiagovs Aug 15, 2026
1732fd3
fix(host_link): guard log hook against re-entrant recursion
lthiagovs Aug 15, 2026
ad59a79
fix(deps): cap esp_lvgl_port below 2.9.0 for IDF 5.5
lthiagovs Aug 15, 2026
d978778
chore(config): pin IDF target to esp32p4 in defaults
lthiagovs Aug 15, 2026
b0a618a
chore(tools): add host_link push script
lthiagovs Aug 15, 2026
09ed99e
refactor(ui): migrate micrec to event-driven input
lthiagovs Aug 15, 2026
086a587
refactor(ui): migrate speaker to event-driven input
lthiagovs Aug 15, 2026
3add224
refactor(ui): migrate spectrum to event-driven input
lthiagovs Aug 15, 2026
c9a2b85
refactor(ui): migrate wav library to event-driven input
lthiagovs Aug 15, 2026
61e2cf2
refactor(ui): migrate wav player to event-driven input
lthiagovs Aug 15, 2026
ca86915
refactor(ui): migrate badusb menu to event-driven input
lthiagovs Aug 15, 2026
397f93d
refactor(ui): migrate usb mouse to event-driven input
lthiagovs Aug 15, 2026
db8f9e7
refactor(ui): migrate ble beacon to event-driven input
lthiagovs Aug 15, 2026
64b1a62
refactor(ui): migrate ble companion to event-driven input
lthiagovs Aug 15, 2026
b272656
refactor(ui): migrate ble detect to event-driven input
lthiagovs Aug 15, 2026
ce261ff
refactor(ui): migrate ble exposure to event-driven input
lthiagovs Aug 15, 2026
436ec84
refactor(ui): migrate ble flood to event-driven input
lthiagovs Aug 15, 2026
6dabac8
refactor(ui): migrate ble keyboard to event-driven input
lthiagovs Aug 15, 2026
bea0907
refactor(ui): migrate ble radio to event-driven input
lthiagovs Aug 15, 2026
a6c701c
refactor(ui): migrate ble scan to event-driven input
lthiagovs Aug 15, 2026
093f04d
refactor(ui): migrate ble skimmer to event-driven input
lthiagovs Aug 15, 2026
8b7edcd
refactor(ui): migrate ble sniffer to event-driven input
lthiagovs Aug 15, 2026
16bf524
refactor(ui): migrate ble spam names to event-driven input
lthiagovs Aug 15, 2026
2a2a782
refactor(ui): migrate ble spam to event-driven input
lthiagovs Aug 15, 2026
36cdb23
refactor(ui): migrate ble track device to event-driven input
lthiagovs Aug 15, 2026
712fe09
refactor(ui): migrate ble tracker to event-driven input
lthiagovs Aug 15, 2026
fa69edf
refactor(ui): migrate gatt explorer to event-driven input
lthiagovs Aug 15, 2026
c08ddbc
refactor(ui): migrate connect wifi to event-driven input
lthiagovs Aug 15, 2026
af6f688
refactor(ui): migrate connection settings to event-driven input
lthiagovs Aug 15, 2026
dba4e3b
refactor(ui): migrate dev console to event-driven input
lthiagovs Aug 15, 2026
f6bdeb2
refactor(ui): migrate dev diag to event-driven input
lthiagovs Aug 15, 2026
20b9cd8
refactor(ui): migrate scripts to event-driven input
lthiagovs Aug 15, 2026
c73c080
refactor(ui): migrate files to event-driven input
lthiagovs Aug 15, 2026
13d579b
refactor(ui): migrate imu monitor to event-driven input
lthiagovs Aug 15, 2026
94a568e
refactor(ui): migrate gpio to event-driven input
lthiagovs Aug 15, 2026
e7e8a4a
refactor(ui): migrate haptic to event-driven input
lthiagovs Aug 15, 2026
e781bb5
refactor(ui): migrate ir burst to event-driven input
lthiagovs Aug 15, 2026
0f3cf93
refactor(ui): migrate ir controller to event-driven input
lthiagovs Aug 15, 2026
a6bf43f
refactor(ui): migrate ir raw to event-driven input
lthiagovs Aug 15, 2026
4fb2062
refactor(ui): migrate ir receive to event-driven input
lthiagovs Aug 15, 2026
dbf896e
refactor(ui): migrate ir remote type to event-driven input
lthiagovs Aug 15, 2026
c6f56d5
refactor(ui): migrate ir saved to event-driven input
lthiagovs Aug 15, 2026
753e300
refactor(ui): migrate ir send to event-driven input
lthiagovs Aug 15, 2026
b018acf
refactor(ui): migrate lora channels to event-driven input
lthiagovs Aug 15, 2026
7bdc51a
refactor(ui): migrate lora chat to event-driven input
lthiagovs Aug 15, 2026
83d7888
refactor(ui): migrate lora mqtt to event-driven input
lthiagovs Aug 15, 2026
2c7524c
refactor(ui): migrate lora position to event-driven input
lthiagovs Aug 15, 2026
6cec25d
refactor(ui): migrate lora rnode to event-driven input
lthiagovs Aug 15, 2026
3dbe791
refactor(ui): migrate lora securedm to event-driven input
lthiagovs Aug 15, 2026
92f8f1b
refactor(ui): migrate lora telemetry to event-driven input
lthiagovs Aug 15, 2026
1a965fc
refactor(ui): migrate lora traceroute to event-driven input
lthiagovs Aug 15, 2026
be93039
refactor(ui): migrate card emu to event-driven input
lthiagovs Aug 15, 2026
6bf3bdc
refactor(ui): migrate nfc bankcard to event-driven input
lthiagovs Aug 15, 2026
6ce88b3
refactor(ui): migrate nfc config to event-driven input
lthiagovs Aug 15, 2026
11e8865
refactor(ui): migrate nfc desfire to event-driven input
lthiagovs Aug 15, 2026
0728bae
refactor(ui): migrate nfc emulate to event-driven input
lthiagovs Aug 15, 2026
f393ceb
refactor(ui): migrate nfc felica to event-driven input
lthiagovs Aug 15, 2026
c2ce431
refactor(ui): migrate nfc iso15693 to event-driven input
lthiagovs Aug 15, 2026
e88bfdb
refactor(ui): migrate nfc keydict to event-driven input
lthiagovs Aug 15, 2026
05676e7
refactor(ui): migrate nfc ndef to event-driven input
lthiagovs Aug 15, 2026
93d14dd
refactor(ui): migrate nfc p2p to event-driven input
lthiagovs Aug 15, 2026
0b3c8c8
refactor(ui): migrate nfc read to event-driven input
lthiagovs Aug 15, 2026
bb58981
refactor(ui): migrate nfc saved to event-driven input
lthiagovs Aug 15, 2026
5ad04ae
refactor(ui): migrate nfc scan to event-driven input
lthiagovs Aug 15, 2026
a8202e2
refactor(ui): migrate nfc ultralight to event-driven input
lthiagovs Aug 15, 2026
854beef
refactor(ui): migrate nfc write to event-driven input
lthiagovs Aug 15, 2026
8e39b3e
refactor(ui): migrate octobit status to event-driven input
lthiagovs Aug 15, 2026
44fe9ec
refactor(ui): migrate power to event-driven input
lthiagovs Aug 15, 2026
24a0ebb
refactor(ui): migrate rfid menu to event-driven input
lthiagovs Aug 15, 2026
624d517
refactor(ui): migrate about settings to event-driven input
lthiagovs Aug 15, 2026
a364f10
refactor(ui): migrate battery settings to event-driven input
lthiagovs Aug 15, 2026
912c9ae
refactor(ui): migrate c5 status to event-driven input
lthiagovs Aug 15, 2026
dbd89a9
refactor(ui): migrate display settings to event-driven input
lthiagovs Aug 15, 2026
093eb2c
refactor(ui): migrate interface settings to event-driven input
lthiagovs Aug 15, 2026
4f1e245
refactor(ui): migrate led ctrl to event-driven input
lthiagovs Aug 15, 2026
81eb482
refactor(ui): migrate sd health to event-driven input
lthiagovs Aug 15, 2026
3b616d9
refactor(ui): migrate settings to event-driven input
lthiagovs Aug 15, 2026
8b51541
refactor(ui): migrate sound settings to event-driven input
lthiagovs Aug 15, 2026
2825299
refactor(ui): migrate storage settings to event-driven input
lthiagovs Aug 15, 2026
ebde0b2
refactor(ui): migrate system update to event-driven input
lthiagovs Aug 15, 2026
f9110bd
refactor(ui): migrate subghz brute to event-driven input
lthiagovs Aug 15, 2026
f81fad6
refactor(ui): migrate subghz config to event-driven input
lthiagovs Aug 15, 2026
8ec181b
refactor(ui): migrate subghz menu to event-driven input
lthiagovs Aug 15, 2026
78d52ba
refactor(ui): migrate subghz read to event-driven input
lthiagovs Aug 15, 2026
be5b4fa
refactor(ui): migrate subghz send to event-driven input
lthiagovs Aug 15, 2026
cc8dc72
refactor(ui): migrate theme selector to event-driven input
lthiagovs Aug 15, 2026
0a84b29
refactor(ui): migrate wifi attack to event-driven input
lthiagovs Aug 15, 2026
8b29641
refactor(ui): migrate wifi channel to event-driven input
lthiagovs Aug 15, 2026
5b9494f
refactor(ui): migrate wifi client to event-driven input
lthiagovs Aug 15, 2026
ff8017b
refactor(ui): migrate wifi deauth detector to event-driven input
lthiagovs Aug 15, 2026
f1d4781
refactor(ui): migrate wifi evil twin to event-driven input
lthiagovs Aug 15, 2026
8393658
refactor(ui): migrate wifi handshake to event-driven input
lthiagovs Aug 15, 2026
3df55fb
refactor(ui): migrate wifi hotspot to event-driven input
lthiagovs Aug 15, 2026
28b8b6f
refactor(ui): migrate wifi names to event-driven input
lthiagovs Aug 15, 2026
58f2128
refactor(ui): migrate wifi packets to event-driven input
lthiagovs Aug 15, 2026
8f30e33
refactor(ui): migrate wifi port scan to event-driven input
lthiagovs Aug 15, 2026
1bbe4fa
refactor(ui): migrate wifi probe mon to event-driven input
lthiagovs Aug 15, 2026
0cf5b3f
refactor(ui): migrate wifi scan to event-driven input
lthiagovs Aug 15, 2026
70e07a2
refactor(ui): migrate wifi signal locator to event-driven input
lthiagovs Aug 15, 2026
9e4bd6e
refactor(ui): migrate wifi target clients to event-driven input
lthiagovs Aug 15, 2026
0184686
feat(power): hold OK+LEFT for 3s to power off (ship mode); combo avoi…
anarchyysm Aug 15, 2026
0b4fa1c
fix(led): move blink-off I2C to a dedicated task (esp_timer callback …
anarchyysm Aug 15, 2026
4e199c0
fix(console): start UART REPL after host_link (UART0 takeover raced b…
anarchyysm Aug 15, 2026
5250110
fix(console): disable secondary USB-Serial-JTAG console (blocking wri…
anarchyysm Aug 15, 2026
66136e1
diag(console): mark esp_console REPL stages on the LED to locate the …
anarchyysm Aug 15, 2026
4904f2c
diag(console): dump new_repl_uart error via esp_rom_printf (bypasses …
anarchyysm Aug 15, 2026
7127c7d
fix(console): free the pre-installed UART0 driver before esp_console_…
anarchyysm Aug 15, 2026
8c86cef
fix(console): shrink REPL task stack 32K->8K (32K internal-RAM alloc …
anarchyysm Aug 15, 2026
f73a23d
chore(console): keep secondary USB-Serial-JTAG console disabled (unre…
anarchyysm Aug 15, 2026
22662ce
feat(power): feed USB state into power_manager (VBUS + TinyUSB mount/…
anarchyysm Aug 15, 2026
bb3d1dd
feat(power): enable light sleep with pinned frequency (no DFS)
anarchyysm Aug 15, 2026
d7d70aa
feat(console): add battery status command
anarchyysm Aug 15, 2026
bcc7bea
fix(bq25896): disarm /QON auto-reset and delay BATFET off on power-off
anarchyysm Aug 15, 2026
eb72e1b
feat(ui): free the outgoing screen on navigation
lthiagovs Aug 15, 2026
925fca9
refactor(ui): free wifi screens on navigation
lthiagovs Aug 15, 2026
8034261
refactor(ui): free nfc screens on navigation
lthiagovs Aug 15, 2026
48fbaab
refactor(ui): free bluetooth screens on navigation
lthiagovs Aug 15, 2026
efbf242
refactor(ui): free lora screens on navigation
lthiagovs Aug 15, 2026
420387a
refactor(ui): free infrared screens on navigation
lthiagovs Aug 15, 2026
890682d
refactor(ui): free subghz screens on navigation
lthiagovs Aug 15, 2026
0cf6da6
refactor(ui): free settings screens on navigation
lthiagovs Aug 15, 2026
84b815e
refactor(ui): free audio screens on navigation
lthiagovs Aug 15, 2026
d8eb1c5
refactor(ui): free games screens on navigation
lthiagovs Aug 15, 2026
28d4cbc
refactor(ui): free dev screens on navigation
lthiagovs Aug 15, 2026
fdc8bf0
refactor(ui): free menu and misc screens on navigation
lthiagovs Aug 15, 2026
c91f956
feat(spi_bridge): add CRC-16 frame integrity to the P4/C5 protocol [S…
anarchyysm Aug 15, 2026
8c3abbb
refactor(spi_bridge): sync C5 spi_protocol.h to the P4 superset [SPI-2]
anarchyysm Aug 15, 2026
4e65984
feat(spi_bridge): version the wire protocol and check C5 match at boo…
anarchyysm Aug 15, 2026
12e3827
fix(spi_bridge): cap SPI_MAX_PAYLOAD at 255 to match uint8_t length, …
anarchyysm Aug 15, 2026
dc5c731
fix(spi_bridge): validate announced length in C5 inline handlers befo…
anarchyysm Aug 15, 2026
c56077d
fix(spi_bridge): add out_capacity to send_command and clamp response …
anarchyysm Aug 15, 2026
c978583
fix(spi_bridge): require valid CRC in POLL resync so junk cannot end …
anarchyysm Aug 15, 2026
9c674c8
feat(c5): capture coredumps to a dedicated flash partition
anarchyysm Aug 15, 2026
d8ab900
refactor(c5): drop unused BQ25896 driver and align sys_monitor API wi…
anarchyysm Aug 15, 2026
29c7054
chore(spi_bridge): drop obvious comments
anarchyysm Aug 15, 2026
4753c4d
feat(storage): atomic config writes with crash recovery
lthiagovs Aug 15, 2026
e76cd36
feat(c5): OTA rollback validated by P4 bridge health [C5-5]
anarchyysm Aug 15, 2026
26314e9
refactor(kernel): install the GPIO ISR service once at boot, not per-…
anarchyysm Aug 15, 2026
161ce7c
refactor(c5/wifi): drop dead PSRAM static hopper alloc, use dynamic t…
anarchyysm Aug 15, 2026
07d527c
fix(c5/wifi): set band mode before AP config so a 5G-only NVS state c…
anarchyysm Aug 15, 2026
b5a8aa1
feat(config): add wifi radio enable flag, default radios off
lthiagovs Aug 15, 2026
5a4270e
feat(bluetooth): expose cached BLE running state for cheap UI reads
lthiagovs Aug 15, 2026
ba54160
refactor(wifi): decouple status poll from radio start, cache BLE state
lthiagovs Aug 15, 2026
9a25252
feat(header): show wifi/ble by enabled state, color by real link
lthiagovs Aug 15, 2026
0ffc4a5
feat(dropdown): real wifi/ble toggles with config persistence
lthiagovs Aug 15, 2026
0ea0a21
feat(core): apply saved wifi/ble radio state at boot
lthiagovs Aug 15, 2026
337c48b
feat(c5): enable the 8MB in-package PSRAM
anarchyysm Aug 15, 2026
8da79f3
refactor(c5/wifi): restore channel hopper stack in PSRAM (confirmed p…
anarchyysm Aug 15, 2026
95e9df8
fix(kernel): initialize the drv2605l haptic driver at boot [item 33]
anarchyysm Aug 15, 2026
e78f173
chore(drivers): remove orphaned qmi8658a driver (never built or used)…
anarchyysm Aug 15, 2026
a6e02c9
fix(boot_report): count real boots in NVS, Octobit reads it instead o…
anarchyysm Aug 15, 2026
60ea83d
feat(sys_monitor): heap policy with thresholds + failed-alloc callbac…
anarchyysm Aug 15, 2026
3bed36d
feat(assets): safe image-cache eviction wired into the heap policy [i…
anarchyysm Aug 15, 2026
660faab
feat(core): validate SD health at boot, remount if it fails
lthiagovs Aug 15, 2026
f68e24b
feat(header): route SD remount requests through the card-detect worker
lthiagovs Aug 15, 2026
413b850
feat(sys_monitor): periodic SD health check, remount on failure
lthiagovs Aug 15, 2026
fb97083
feat(i2c): recover a stuck bus at init and return esp_err_t [item 35]
anarchyysm Aug 15, 2026
e346c67
refactor(i2c): migrate to i2c_master.h, add reactive bus recovery + h…
anarchyysm Aug 15, 2026
0ea5c1f
chore(system): hold panic backtrace 2s before reboot [item 26]
anarchyysm Aug 15, 2026
9d60b1a
fix(ui): tick-safe input-lock comparison to survive the 49.7-day wrap…
anarchyysm Aug 15, 2026
8f08e79
feat(console): add stack budget report command
lthiagovs Aug 15, 2026
0b53ba8
perf(rtos): right-size battery and feedback task stacks
lthiagovs Aug 15, 2026
a3119af
fix(kernel): stop initializing drv2605l (board haptic is an AW8623, w…
anarchyysm Aug 15, 2026
9ccd1b9
feat(console): add i2cscan command for bus diagnostics
anarchyysm Aug 15, 2026
0ccd380
feat(time): add sys_time service with build-date baseline
lthiagovs Aug 15, 2026
96190d2
feat(time): show clock in header and add date console command
lthiagovs Aug 15, 2026
6cbdb9f
feat(ble): arbitrate nimble between bt apps and gatt profiles
lthiagovs Aug 16, 2026
ac75b83
perf(c5): right-size ble buffers and spi bridge stack
lthiagovs Aug 16, 2026
4e24ea6
feat(lora): add unified mesh session manager
lthiagovs Aug 16, 2026
5c8dd38
feat(lora): add traceroute request and result capture
lthiagovs Aug 16, 2026
30d6e6f
feat(lora): rewire mesh UI screens onto session manager
lthiagovs Aug 16, 2026
1d323b8
feat(wifi): drive UI screens from live wifi_service instead of mocks
lthiagovs Aug 16, 2026
93be30b
feat(ble): add sniffer observer hook and radio guards to backend
lthiagovs Aug 16, 2026
f0cc63e
feat(ble): wire bluetooth screens to real radio backend
lthiagovs Aug 16, 2026
0df4824
feat(home): redesign home with date, art and pinned favorites
lthiagovs Aug 16, 2026
7b53f5f
feat(ui): replace mock diagnostics and status with live readings
lthiagovs Aug 16, 2026
d9d149f
feat(ui): add date/time editor with sd guard and tip input routing
lthiagovs Aug 16, 2026
bc480a6
feat(ui): trim themes to two and persist screen config
lthiagovs Aug 16, 2026
9f627c2
feat(badusb): deliver real ducky payloads over native USB
lthiagovs Aug 16, 2026
881883a
feat(ui): add SD eject, menu favorites, and quick-panel volume
lthiagovs Aug 16, 2026
bc990be
feat(audio): persist volume in sound settings and record mic to WAV
lthiagovs Aug 16, 2026
03d7c2a
fix(core): apply saved boot config and harden low-level drivers
lthiagovs Aug 16, 2026
a3e762b
feat(ui): trim screen theme palettes to default and cyber blue
lthiagovs Aug 16, 2026
26d3159
perf(mem): lower spiram always-internal threshold to free internal ram
lthiagovs Aug 16, 2026
9180f44
chore(clang): clang format files
anarchyysm Aug 17, 2026
63a0c9e
refactor(build): unifica versao em version_info.txt gerado no build
anarchyysm Aug 17, 2026
89425b5
chore: merge main into dev (resolve versao/ota_version)
anarchyysm Aug 17, 2026
78410e2
ci: permite tipos diag/tweak, torna HLE nao-bloqueante e corrige form…
anarchyysm Aug 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 26 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install clang-format
run: pip install clang-format==22.1.3

- name: Run format check
run: bash tools/format.sh --check
run: bash tools/format.sh --check-changed "${{ github.event.pull_request.base.sha }}"

commitlint:
name: Validate Commits
Expand Down Expand Up @@ -50,3 +52,26 @@ jobs:
- name: Build
run: bash tools/build.sh
shell: bash

hle-tests:
name: HLE Tests
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsdl2-dev

- name: Configure
run: cmake -B build -S tools/hle
env:
SDL_VIDEODRIVER: dummy

- name: Build tests
run: cmake --build build --target hle_tests -j$(nproc)

- name: Run tests
run: ./build/hle_tests
10 changes: 2 additions & 8 deletions .releaserc.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,13 @@ module.exports = {
[
"@semantic-release/exec",
{
prepareCmd:
"sed -i 's/\"version\": *\"[^\"]*\"/\"version\": \"${nextRelease.version}\"/' firmware_p4/assets/config/OTA/firmware.json firmware_c5/assets/config/OTA/firmware.json && sed -i 's/#define FIRMWARE_VERSION \"[^\"]*\"/#define FIRMWARE_VERSION \"${nextRelease.version}\"/' firmware_p4/components/Service/ota/include/ota_version.h",
prepareCmd: "printf '%s\\n' '${nextRelease.version}' > common/metadata/version_info.txt",
},
],
[
"@semantic-release/git",
{
assets: [
"CHANGELOG.md",
"firmware_p4/assets/config/OTA/firmware.json",
"firmware_c5/assets/config/OTA/firmware.json",
"firmware_p4/components/Service/ota/include/ota_version.h",
],
assets: ["CHANGELOG.md", "common/metadata/version_info.txt"],
message: "chore(release): v${nextRelease.version}",
},
],
Expand Down
120 changes: 120 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# TentacleOS — Agent Instructions

## Project Overview

Embedded firmware for the High Boy platform (ESP32-S3/P4/C5). Dual-firmware architecture: ESP32-C5 is the co-processor, ESP32-P4 is the master that embeds the C5 binary at build time.

## Build & Flash

ESP-IDF v5.5.3 is the pinned version. Source the environment before any build command:

```bash
. $HOME/esp/v5.5.3/esp-idf/export.sh # or rely on $IDF_PATH
```

Full build (C5 then P4, in order — P4 embeds the C5 binary):

```bash
./tools/build.sh
```

Build a single target:

```bash
cd firmware_c5 && idf.py -DIDF_TARGET=esp32c5 build
cd firmware_p4 && idf.py -DIDF_TARGET=esp32p4 build
```

Flash (P4 only, which also programs C5):

```bash
./tools/flash.sh
```

## Formatting

Formatting is enforced by CI and the pre-commit hook. Run manually before committing:

```bash
./tools/format.sh # fix all firmware sources
./tools/format.sh --check # verify all firmware sources
./tools/format.sh --changed <base-ref> # fix files changed from a base
./tools/format.sh --check-changed <base-ref> # verify changed files (CI uses this)
```

Config: `.clang-format` — LLVM base, 2-space indent, 100-column limit, pointers right-aligned, no sorted includes. Only `.c` and `.h` files under `firmware_*/` are formatted.

## Commit Messages

Conventional Commits enforced by git hook and CI. Format: `<type>(<scope>): <description>`

Types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`, `ci`, `build`, `revert`, `delete`, `deleted`, `remove`, `removed`

Breaking changes use `!` before the colon. Header max length: 200 chars.

## Repo Structure

```
firmware_c5/ # ESP32-C5 co-processor firmware
firmware_p4/ # ESP32-P4 master firmware (embeds C5 binary)
components/
Drivers/ # Hardware drivers (SPI, buttons, display, radio, USB)
Service/ # Support services (OTA, WiFi, console, storage, SPI bridge)
Core/ # System core and main managers
Applications/ # User-facing apps (UI, bad_usb, SubGhz)
Drivers/spi_bridge_phy/ # SPI bridge physical layer (P4 side)
main/main.c # Entry point
common/metadata/ # Shared metadata
tools/ # Build, flash, format, setup scripts
```

Each target is a standalone ESP-IDF project with its own `CMakeLists.txt`, `partitions.csv`, and `sdkconfig.defaults`.

## Coding Standards

All rules are in `CODING_STANDARDS.md`. Key points an agent must not miss:

- **Public functions** are prefixed with module name (`cc1101_set_frequency()`). **Static functions** drop the prefix (`process_pulse()`).
- **Variables**: local `snake_case`, static `s_` prefix, global `g_` prefix, bools `is_`/`has_`/`can_`, output params `out_`.
- **Types**: `module_name_t` with `_cb_t` for callbacks.
- **Constants**: `UPPER_SNAKE_CASE`. Every literal with domain meaning must be a named `#define` (except `0`, `1`, `NULL`, `true`, `false`).
- **Enums**: `UPPER_SNAKE_CASE` with module prefix, include `_COUNT` sentinel when iterable.
- **Fixed-width types** from `<stdint.h>` for all hardware code. Never rely on implicit `int`.
- **Error handling**: public functions return `esp_err_t`. Every `malloc` must be checked for `NULL`, logged with `ESP_LOGE`, and handled via `goto cleanup`.
- **Logging**: every `.c` file defines `static const char *TAG = "MODULE_NAME";`. Use `ESP_LOGx` macros, never `printf`.
- **File layout order**: license, own header, C stdlib, ESP-IDF/FreeRTOS, project headers, defines, static types, static vars, forward decls, public funcs, static funcs.
- **Headers**: `#ifndef` guards, `extern "C"` blocks, include order separated by blank lines.
- **Source file layout**: `^[0-9a-z_]+\.[ch]$`, filename is a prefix for its content.

## Hook Setup

Run once after cloning:

```bash
./tools/setup.sh
```

This sets `core.hooksPath` to `.githooks/` (pre-commit: clang-format, commit-msg: conventional commits).

## CI

GitHub Actions runs on PRs to `main`/`dev`:
1. **Format check** — `./tools/format.sh --check`
2. **Commitlint** — validates all commits in PR
3. **Build** — both targets inside `espressif/idf:v5.5.3` container via `./tools/build.sh`

All must pass before merge.

## Generated Files (do not edit)

- `managed_components/` — ESP-IDF component manager (gitignored)
- `sdkconfig` / `sdkconfig.old` — ESP-IDF build config (gitignored); use `sdkconfig.defaults` instead
- `dependencies.lock` — ESP-IDF component manager lockfile (gitignored)
- Build outputs in `build/` directories (gitignored)

## Versioning

Automated via semantic-release on `main`. Do not manage versions manually — commit messages determine bumps. Version is written to:
- `firmware_p4/assets/config/OTA/firmware.json`
- `firmware_c5/assets/config/OTA/firmware.json`
- `firmware_p4/components/Service/ota/include/ota_version.h`
24 changes: 24 additions & 0 deletions CODING_STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,30 @@ cleanup:
- All shared state must be initialized before `xTaskCreate`.
- Tasks must release all resources before `vTaskDelete`. Set handles to `NULL` after deletion.

### Task priority and core affinity

- Every task priority and core comes from `sys_prio.h` (in `Drivers/sys_prio/include`, the
one component every task-creating module already depends on). Never pass a raw number or a
private `#define` for a task priority or core.
- Always pin tasks with `xTaskCreatePinnedToCore` (or `xTaskCreateStaticPinnedToCore`).
Do not use the unpinned `xTaskCreate` / `xTaskCreateStatic`.
- Priority bands (higher number is higher priority):

| Macro | Prio | Use |
|-------|------|-----|
| `SYS_PRIO_REALTIME` | 10 | Deferred ISR / hard real-time (radio IRQ) |
| `SYS_PRIO_RENDER` | 6 | LVGL renderer only |
| `SYS_PRIO_SERVICE_HI` | 5 | Latency-sensitive services (host link, radio rx/tx, streaming) |
| `SYS_PRIO_SERVICE_LO` | 4 | Regular services (media playback, capture, UI helpers) |
| `SYS_PRIO_BACKGROUND` | 3 | Periodic polling, logging, telemetry |
| `SYS_PRIO_BACKGROUND_LO` | 2 | Lowest non-idle background work |
| `SYS_PRIO_MONITOR` | 1 | Health monitor |

- Core affinity: `SYS_CORE_UI` (core 1) runs the renderer plus everything that feeds the
screen (media, capture, UI helper tasks). `SYS_CORE_RADIO` (core 0) runs radios, host
link, bridge, storage and background services. The renderer must never share a core with
a radio or USB stream.


## Headers

Expand Down
139 changes: 136 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ We are expanding support for the latest Espressif chips:

| Target | Status |
| :--- | :--- |
| **ESP32-S3** | Main Development |
| **ESP32-P4** | Experimental (firmware_p4) |
| **ESP32-C5** | Experimental (firmware_c5) |
| **ESP32-P4** | Main Development |
| **ESP32-C5** | Main Development |


## Firmware Structure
Expand Down Expand Up @@ -70,6 +69,140 @@ Example layout:
```


## Native HLE simulator

The host-level emulation (HLE) target runs the P4 UI, LVGL, host-backed storage,
and a simulated C5 SPI bridge on Linux. It is intended for UI and firmware-flow
development without a connected High Boy.

<p align="center">
<img src="pics/hle-emulator.png" alt="TentacleOS HLE emulator boot screen" width="240"/>
<br/>
<em>Boot screen rendered by the native SDL simulator.</em>
</p>

### Requirements

- Linux
- CMake 3.16 or newer
- A C11/C++17 toolchain
- Git and the SDL2 development headers
- Internet access during the first configure, which downloads LVGL, cJSON, and
GoogleTest

On Ubuntu or Debian:

```bash
sudo apt update
sudo apt install build-essential cmake git libsdl2-dev
```

ESP-IDF, an ESP32 toolchain, and connected High Boy hardware are not required
for the native simulator.

### Build and run

Run these commands from the repository root:

```bash
cmake -S tools/hle -B build
cmake --build build --target hle_interactive -j
./build/hle_interactive
```

The first build also converts the assets under `firmware_p4/assets`. After UI
or firmware changes, rerun the `cmake --build` command and restart the
simulator; reconfiguration is only needed after CMake or source-layout changes.

### Controls

| High Boy input | Keyboard |
| :--- | :--- |
| Directional buttons | Arrow keys or W/A/S/D |
| OK | Enter, keypad Enter, or Space |
| Back | Backspace or Escape |
| Exit simulator | Ctrl+Q or close the window |

### Storage

The simulator stores `/sdcard` data under `/tmp/hle_storage` by default.
Override the location with `HLE_STORAGE_PATH`:

```bash
HLE_STORAGE_PATH="$HOME/.local/state/tentacleos-hle" ./build/hle_interactive
```

Point `HLE_STORAGE_PATH` at a new empty directory to exercise the firmware's
first-boot flow again.

### Headless snapshots

For deterministic, headless UI snapshots:

```bash
SDL_VIDEODRIVER=dummy \
HLE_SNAPSHOT_PATH=/tmp/high-boy.ppm \
HLE_SNAPSHOT_MS=6500 \
./build/hle_interactive
```

The snapshot example renders for 6500 ms, writes a PPM image, and exits. It is
also suitable for CI or SSH sessions without a display server.

### Tests

Run the native regression suite with:

```bash
cmake --build build --target hle_tests -j
ctest --test-dir build --output-on-failure
```

#### Example: testing display output

Every `*.cpp` file under `tools/hle/tests` is compiled into `hle_tests` and
automatically registered with GoogleTest. For example, create
`tools/hle/tests/test_my_ui.cpp`:

```cpp
#include <array>
#include <cstdint>

#include <gtest/gtest.h>

#include "hle/hle_display.h"

TEST(MyUIScreen, DrawsExpectedPixel) {
auto &display = hle::Display::instance();
display.fill_screen(0);

constexpr uint16_t expected_color = 0xF81F;
display.draw_bitmap(12, 20, 13, 21, &expected_color);

std::array<uint16_t, hle::LCD_H_RES * hle::LCD_V_RES> framebuffer{};
ASSERT_TRUE(display.copy_pixels_if_dirty(
framebuffer.data(), hle::LCD_H_RES * sizeof(uint16_t)));
EXPECT_EQ(framebuffer[(20 * hle::LCD_H_RES) + 12], expected_color);
}
```

Build and run only that test:

```bash
cmake --build build --target hle_tests -j
./build/hle_tests --gtest_filter=MyUIScreen.DrawsExpectedPixel
```

Use the same pattern for NVS, SPI bridge, input, and other host-emulated
contracts. Tests that include C firmware headers should place those includes
inside an `extern "C"` block.

### Scope and limitations

The HLE covers UI and host-emulated firmware flows. Wi-Fi, Bluetooth, radio,
and other physical-hardware behavior still require target testing.


## How to Contribute

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
Expand Down
Loading
Loading