Commit Graph
4 Commits
Author SHA1 Message Date
swaitsandClaude Opus 4.7 01b96bdbf6 feat: composite HID mouse+keyboard with WakingHost statechart
Refactor the boot wake sequence into a WakingHost parent state with
WakingWithKeyboard (default, taps Left Shift 4×) timing out after 500 ms
into WakingWithMouse (existing shake). macOS does not reliably wake from
raw HID mouse motion; a keyboard event does — Shift is a no-op modifier
so it has no character side effect. Parent catches WakeDone (emitted by
the mouse path) and exits to Settling.

USB identity: 046d:c07d "G502 Mouse" → 046d:c52b "USB Receiver"
(Logitech Unifying Receiver — a real composite mouse+keyboard device).
Implementation uses two HidWriters on one embassy_usb::Builder; standard
USB composite, no hub simulation.

Naming cleanup throughout the statechart:
- BootSweep → Booting; SweepDone → BootDone; led_rgb_sweep → boot_sweep
- WakingDisplay → WakingHost{WakingWithKeyboard, WakingWithMouse}
- ShowingRunning → Spinning; RunDone → SpinDone; animate_running → animate_spinner
- Ending::ShutdownAnim → Ending::Spiraling; ShutdownAnimDone → SpiralDone
- animate_shutdown → animate_final_spiral; SHUTDOWN_* → FINAL_SPIRAL_*
- Ctx.writer/Writer → Ctx.mouse/MouseHid (+ new Ctx.kbd/KbdHid)
- send → send_mouse (+ new send_kbd)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 12:14:47 -06:00
swaits cb95dadc2a feat: accelerating spin-down spiral + 10/5-min mini-spiral warnings 2026-04-30 11:43:02 -06:00
swaitsandClaude Opus 4.7 3f75514d9c 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>
2026-04-29 11:35:00 -06:00
swaitsandClaude Opus 4.7 0032d01638 feat: initial Xiao RP2040 mouse jiggler firmware
Embassy-based no_std firmware for the Seeed Studio Xiao RP2040 that
masquerades as a Dell MS116 USB HID Boot Mouse. Each cycle picks a
random axis from the RP2040 ROSC RANDOMBIT register, nudges +1 px,
dwells 25 ms, nudges -1 px, then sleeps 4.5 minutes. After 8 hours
elapsed from boot or RESET press the device idles silently (watchdog
still fed) until the user taps RESET (R) again, aligning a single
press with one workday.

Tooling:
- mise.toml pins rust 1.95.0 with explicit components and the
  thumbv6m-none-eabi target, plus cargo-binutils / uf2conv helpers.
- justfile shell is set to "mise exec -- sh -eu -c" so every recipe
  uses the pinned toolchain without any shell activation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 14:59:30 -06:00