Add "All Boards On" as a mappable switch action

Maps the rig's "All" button (selectAllBoards — cancel any solo, bring every
board back up) to a Program Change. One-shot (no latch); rig-level, so no
board hint. Appears in the Switches section under Rig Bypass.

Test: PC fires selectAllBoards, clearing an active solo. 320 green; both app
targets build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-01 12:40:27 -07:00
parent 1ba622a611
commit a7bbda4166
4 changed files with 27 additions and 1 deletions
@@ -108,6 +108,26 @@ struct MIDIControllerPCTests {
}
}
@Test func allBoardsActionCancelsSolo() throws {
let (controller, sg, boards, url): (MIDIController, ShoeGaze, [PedalBoard], URL) =
try makeRig(boardCount: 2)
defer { try? FileManager.default.removeItem(at: url) }
withExtendedLifetime(sg) {
// Solo board 2 first, then map + fire the All-Boards action.
sg.soloBoard(boards[1], crossfadeSeconds: 0)
#expect(sg.activeBoardIndex == 1)
controller.armSwitchLearn(.allBoards)
controller.ingestForTesting(.programChange(channel: 0, program: 4)) // learn
controller.ingestForTesting(.programChange(channel: 0, program: 4)) // fire
#expect(sg.activeBoardIndex == nil, "All Boards should clear the solo")
#expect(sg.isBoardAudible(boards[0]) == true)
#expect(sg.isBoardAudible(boards[1]) == true)
}
}
@Test func channelFilterBlocksOtherChannels() throws {
let (controller, sg, _, url): (MIDIController, ShoeGaze, [PedalBoard], URL) = try makeRig()
defer { try? FileManager.default.removeItem(at: url) }