refactor: drive display via hsmc statechart
Replaces the ad-hoc display loop with a declarative hsmc statechart
(Off/On.{Splash.{LearnMore,Info}, Dashboard.{Listening,Transmitting}})
and swaps the Radio→Display channel from a RadioStatus watch to a
typed RadioEvent queue. The radio task now emits discrete mode and
packet events instead of publishing full status snapshots; the
display consumes them through the statechart, which also handles the
5 s splash alternation and 1 s sparkline tick via `on(after …)` /
`on(every …)` transitions.
Also:
- Add hsmc dep and embassy/tokio feature shims (hsmc proc macro
evaluates `cfg(feature = "embassy")` in this crate).
- Fix USB disconnect path in `host/usb.rs` so the DTR branch always
runs on read error (was early-continuing, starving display/radio
reset).
This commit is contained in:
7 files changed
+661
-347
No files matched your search
Generated
+21
@@ -514,6 +514,7 @@ dependencies = [
|
||||
"esp-println",
|
||||
"esp-rtos",
|
||||
"heapless 0.9.2",
|
||||
"hsmc",
|
||||
"lora-phy",
|
||||
"minijinja",
|
||||
"owo-colors",
|
||||
@@ -1398,6 +1399,26 @@ version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
||||
|
||||
[[package]]
|
||||
name = "hsmc"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"embassy-futures",
|
||||
"embassy-sync 0.8.0",
|
||||
"embassy-time",
|
||||
"heapless 0.8.0",
|
||||
"hsmc-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hsmc-macros"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.117",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ident_case"
|
||||
version = "1.0.1"
|
||||
|
||||
Reference in new issue
Block a user