pm-kit: draw the real metronome screen on the panel (static sample data)
Switch the firmware from the bring-up diagnostic to pm_ui::draw_metronome with static borrowed lane data (no allocator yet). Shows the actual metronome UI on the device; live track + moving playhead come when pm-core is linked. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
676d9879fa
commit
0ea442d68d
1 changed files with 17 additions and 2 deletions
|
|
@ -133,8 +133,23 @@ fn main() -> ! {
|
||||||
.init(&mut timer)
|
.init(&mut timer)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// Same UI code the host simulator renders (rust/uisim → PNG).
|
// The real metronome screen the host simulator renders (rust/uisim → PNG). Static sample data
|
||||||
pm_ui::draw_ui(&mut display).unwrap();
|
// for now (no allocator needed — draw_metronome takes borrowed slices); the live track + a
|
||||||
|
// moving playhead come once pm-core is linked in.
|
||||||
|
let kick = [2u8, 1, 1, 1];
|
||||||
|
let snare = [0u8, 1, 0, 1];
|
||||||
|
let hat = [2u8, 1, 1, 1, 1, 1, 1, 1];
|
||||||
|
let ride = [2u8, 0, 1, 0, 1, 0, 1, 0];
|
||||||
|
let cow = [2u8, 1, 1];
|
||||||
|
let lanes = [
|
||||||
|
pm_ui::LaneView { name: "kick", levels: &kick, beats: 4, poly: false, muted: false },
|
||||||
|
pm_ui::LaneView { name: "snare", levels: &snare, beats: 4, poly: false, muted: false },
|
||||||
|
pm_ui::LaneView { name: "hatClosed", levels: &hat, beats: 4, poly: false, muted: false },
|
||||||
|
pm_ui::LaneView { name: "ride", levels: &ride, beats: 4, poly: false, muted: false },
|
||||||
|
pm_ui::LaneView { name: "cowbell", levels: &cow, beats: 3, poly: true, muted: false },
|
||||||
|
];
|
||||||
|
let screen = pm_ui::Screen { name: "Four-on-the-floor", bpm: 128, playing: true, phase: 0.30, lanes: &lanes };
|
||||||
|
pm_ui::draw_metronome(&mut display, &screen).unwrap();
|
||||||
|
|
||||||
// Reached the loop → display init + draw completed. Slow 1 Hz blink (vs the solid-ON during
|
// Reached the loop → display init + draw completed. Slow 1 Hz blink (vs the solid-ON during
|
||||||
// init above) so "hung in init" / "running" / "reset loop" are distinguishable on the LED.
|
// init above) so "hung in init" / "running" / "reset loop" are distinguishable on the LED.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue