From aeda9995261c5c2c0e204d26a93e4ce1584d4b54 Mon Sep 17 00:00:00 2001 From: Me Here Date: Mon, 1 Jun 2026 08:02:03 -0500 Subject: [PATCH] =?UTF-8?q?pm-kit:=20diagnostic=20=E2=80=94=20draw=20confi?= =?UTF-8?q?rmed-working=20pattern=20to=20isolate=20blank=20screen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- rust/pm-kit/src/main.rs | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/rust/pm-kit/src/main.rs b/rust/pm-kit/src/main.rs index 9091b73..ee9cae0 100644 --- a/rust/pm-kit/src/main.rs +++ b/rust/pm-kit/src/main.rs @@ -266,23 +266,12 @@ fn main() -> ! { // ---- 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. ---- if full_redraw || now.wrapping_sub(last_draw_us) > 140_000 { - let lanes: Vec = track - .lanes - .iter() - .map(|l| pm_ui::LaneView { - name: &l.sound, - levels: &l.levels, - beats: l.groups.iter().map(|&g| g as u32).sum::().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(); - } + // DIAGNOSTIC: draw the confirmed-working bring-up pattern instead of the metronome, + // to isolate whether the blank screen is draw_metronome or the heap/display path. + // If you see blue + 4 colored corners + "TL"/"PMK" → display+heap are fine and the + // bug is in draw_metronome. If still black → it's the heap/display, not the drawing. + let _ = (notation, idx, tempo, phase, &track); // keep state alive while diagnosing + pm_ui::draw_ui(&mut display).ok(); full_redraw = false; last_draw_us = now; }