From b9536811579ef5c4a8c8892e4892ff01520327e2 Mon Sep 17 00:00:00 2001 From: monkey-w1n5t0n Date: Tue, 21 Jul 2026 14:10:05 +0200 Subject: [PATCH] =?UTF-8?q?fix(firmware):=20restore=20the=20SelfTest=20bui?= =?UTF-8?q?ld=20=E2=80=94=20it=20called=20a=20DisplayDriver=20method=20tha?= =?UTF-8?q?t=20does=20not=20exist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found by actually building the firmware, which nothing in this repo does: CI skips it, run-all-tests.sh skips it, and lint skips it (S9). The SelfTest variant did not compile: glue/selftest.hpp:650: error: 'class DisplayDriver' has no member named 'NavigateToView' Pre-existing, not caused by this audit's work: no commit in this series touched selftest.hpp, and `NavigateToView` appears nowhere in memllib at the pinned commit. DisplayDriver's actual surface is AddView / InsertViewAfter / ChangeView(delta) over a carousel. The call was redundant as well as wrong. DisplayDriver::Setup() leaves currentViewIndex_ at 0 and the selftest adds exactly one view, so that view is already the one on screen. Deleting the call restores the build with no behavioural change on device; a comment records why, since the intent ("navigate to my view") reads as necessary. Worth noting against Phase 1: SineOsc was KEPT there specifically because "the firmware selftest uses it". That was still the right call — deleting it would have added a second breakage to a variant that already had one — but the justification was weaker than it looked, because the selftest had not compiled for some time. Verified by building three variants end to end with arduino-cli, which also constitutes the first real check of this audit's firmware-side deletions (daisysp, input_router.hpp, the perf macros, the peripherals helper extraction): SLPWorkshop flash 145028 B RAM 87384 B (16%) PAFSynth flash 144988 B RAM 107056 B (20%) SelfTest flash 141520 B RAM 12024 B (2%) Those numbers are also the first per-variant size baseline this project has had (plan §6.5f wants exactly this as a gate). Incidentally confirms A6 live: `scripts/build-firmware.sh` rewrote the committed .ino to select each variant, and the working tree had to be restored after every build. That is what the PlatformIO migration deletes. --- firmware/MEMLNaut-NISPS/glue/selftest.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firmware/MEMLNaut-NISPS/glue/selftest.hpp b/firmware/MEMLNaut-NISPS/glue/selftest.hpp index fc3674c..91ceba4 100644 --- a/firmware/MEMLNaut-NISPS/glue/selftest.hpp +++ b/firmware/MEMLNaut-NISPS/glue/selftest.hpp @@ -646,8 +646,11 @@ inline void setup() { }); g_view = std::make_shared("Self Test"); + // AddView appends to the carousel and DisplayDriver::Setup() leaves + // currentViewIndex_ at 0, so this — the selftest's only view — is already + // the one on screen. (There is no NavigateToView in DisplayDriver; a call + // to one used to sit here and had broken this variant's build.) M->disp->AddView(g_view); - M->disp->NavigateToView(g_view); M->setLoopCallback([] { tickStateMachine(); }); WRITE_VOLATILE(g_iface_ready, true);