feat: hsmc statechart rewrite with wake/run/shutdown animations
- Pull the entire device lifecycle into a single hsmc 0.5.1 statechart; remove JIGGLE_FLAG, the Phase enum, the imperative main loop, and the separate led_task. - Add wake-up (horizontal shake), running (3 fast circles), and pre-shutdown (inward spiral) mouse animations as during: activities. - Tighten reset → wake-shake latency from ~2s to ~240ms; HID poll_ms 60 → 8 so the host actually samples animation frames. - Set RUN_DURATION = 3h50m, the math-optimum under the user's workday distribution for "screen sleeps during lunch on most days." Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+16
@@ -3,19 +3,35 @@ name = "jiggly"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[features]
|
||||
default = ["embassy"]
|
||||
# `hsmc` emits `#[cfg(feature = "embassy")]` from inside `statechart!` and
|
||||
# the cfg is evaluated in this crate's context, so we mirror the flag here
|
||||
# and forward it to `hsmc/embassy`.
|
||||
embassy = ["hsmc/embassy"]
|
||||
|
||||
[dependencies]
|
||||
embassy-executor = { version = "0.10.0", features = ["platform-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.5.1" }
|
||||
embassy-rp = { version = "0.10.0", features = ["rp2040", "time-driver", "critical-section-impl", "unstable-pac"] }
|
||||
embassy-sync = "0.8"
|
||||
embassy-futures = "0.1"
|
||||
embassy-usb = "0.6.0"
|
||||
hsmc = { version = "0.5.1", default-features = false }
|
||||
usbd-hid = "0.10.0"
|
||||
smart-leds = "0.4"
|
||||
libm = "0.2"
|
||||
|
||||
cortex-m = { version = "0.7.6", features = ["inline-asm"] }
|
||||
cortex-m-rt = "0.7.5"
|
||||
panic-reset = "0.1"
|
||||
static_cell = "2.1"
|
||||
# Cortex-M0+ has no hardware CAS; static_cell + heapless need this shim.
|
||||
portable-atomic = { version = "1.13", features = ["critical-section"] }
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(feature, values("tokio", "embassy"))'] }
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
opt-level = "s"
|
||||
|
||||
Reference in New Issue
Block a user