pm-kit: diagnostic — draw confirmed-working pattern to isolate blank screen
Temporary: draw_ui (blue + corners) instead of draw_metronome in the loop, keeping heap+audio+inputs. Blue+corners shown => display/heap fine, draw_metronome is the bug. Still black => heap/display path. Revert after diagnosis. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
08b0940d73
commit
aeda999526
1 changed files with 6 additions and 17 deletions
|
|
@ -266,23 +266,12 @@ fn main() -> ! {
|
||||||
// ---- draw: on change, and periodically (so a draw lost right after init reappears, and
|
// ---- draw: on change, and periodically (so a draw lost right after init reappears, and
|
||||||
// the playhead advances). ~7 fps; partial/playhead-only redraw is the next optimization. ----
|
// the playhead advances). ~7 fps; partial/playhead-only redraw is the next optimization. ----
|
||||||
if full_redraw || now.wrapping_sub(last_draw_us) > 140_000 {
|
if full_redraw || now.wrapping_sub(last_draw_us) > 140_000 {
|
||||||
let lanes: Vec<pm_ui::LaneView> = track
|
// DIAGNOSTIC: draw the confirmed-working bring-up pattern instead of the metronome,
|
||||||
.lanes
|
// to isolate whether the blank screen is draw_metronome or the heap/display path.
|
||||||
.iter()
|
// If you see blue + 4 colored corners + "TL"/"PMK" → display+heap are fine and the
|
||||||
.map(|l| pm_ui::LaneView {
|
// bug is in draw_metronome. If still black → it's the heap/display, not the drawing.
|
||||||
name: &l.sound,
|
let _ = (notation, idx, tempo, phase, &track); // keep state alive while diagnosing
|
||||||
levels: &l.levels,
|
pm_ui::draw_ui(&mut display).ok();
|
||||||
beats: l.groups.iter().map(|&g| g as u32).sum::<u32>().min(255) as u8,
|
|
||||||
poly: l.poly,
|
|
||||||
muted: l.mute,
|
|
||||||
})
|
|
||||||
.collect();
|
|
||||||
let screen = pm_ui::Screen { name: NAMES[idx], bpm: tempo, playing, phase, lanes: &lanes };
|
|
||||||
if notation {
|
|
||||||
pm_ui::draw_notation(&mut display, &screen).ok();
|
|
||||||
} else {
|
|
||||||
pm_ui::draw_metronome(&mut display, &screen).ok();
|
|
||||||
}
|
|
||||||
full_redraw = false;
|
full_redraw = false;
|
||||||
last_draw_us = now;
|
last_draw_us = now;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue