seedhammer-v1-companion/cmd
mineracks cf68d6c451 emulator: wake the Events() select on SDCard push
Eject button wasn't taking effect immediately because Platform.Events()
was blocked in a select that only woke on button-channel input or
timer expiry. SDCardEvents go through a separate pending queue and the
select had no way to notice when they arrived — the eject sat in
pending until the next button press or timer expiry, both of which
could take seconds.

Fix: 1-buffered wake channel. signalWake() pokes it (non-blocking),
the select now reads from it as a third case, and the drain-loop at
the end re-drains pending so any event pushed while we waited gets
returned in the same call.

  exportSetSDCard() calls signalWake() after appending to pending.
  Wakeup() (gui.Platform method, previously no-op) now also calls it,
  so any future gui-side wake request works the same way.

The bug was specific to non-button events — button events go through
the events chan directly so they always woke the select.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 21:09:58 +10:00
..
combined-sim Initial skeleton — Phase 1 scaffolding 2026-05-28 18:25:03 +10:00
composer Composer: SH-03 mid-hole at Y=52 — "SH-01 on top of SH-02" 2026-05-28 20:46:36 +10:00
emulator emulator: wake the Events() select on SDCard push 2026-05-28 21:09:58 +10:00
seedsigner-sim Initial skeleton — Phase 1 scaffolding 2026-05-28 18:25:03 +10:00
sh1e-decode #5 SH1E Pi-side decoder + fuzz harness 2026-05-28 20:41:34 +10:00