X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=_Overlay.pde;h=29e2353a8a0989627326d30c99947fab0662243a;hb=eecf5d12c3abaa469041200e113dff676be7b428;hp=971ffde49ded2f1724da5a162d8097f7d6761e9b;hpb=79ae8245d084fe7901933b22a44b404f9d68b925;p=SugarCubes.git diff --git a/_Overlay.pde b/_Overlay.pde index 971ffde..29e2353 100644 --- a/_Overlay.pde +++ b/_Overlay.pde @@ -712,14 +712,14 @@ class DebugUI { final int DEBUG_STATE_WHITE = 1; final int DEBUG_STATE_OFF = 2; - DebugUI(int[][] frontChannels, int[][] rearChannels) { - channelList = new int[frontChannels.length + rearChannels.length][]; + DebugUI(PandaMapping[] pandaMappings) { + int totalChannels = pandaMappings.length * PandaMapping.CHANNELS_PER_BOARD; + channelList = new int[totalChannels][]; int channelIndex = 0; - for (int[] channel : frontChannels) { - channelList[channelIndex++] = channel; - } - for (int[] channel : rearChannels) { - channelList[channelIndex++] = channel; + for (PandaMapping pm : pandaMappings) { + for (int[] channel : pm.channelList) { + channelList[channelIndex++] = channel; + } } for (int i = 0; i < debugState.length; ++i) { for (int j = 0; j < debugState[i].length; ++j) { @@ -728,7 +728,7 @@ class DebugUI { } } - void draw() { + void draw() { noStroke(); int xBase = debugX; int yPos = debugY; @@ -744,7 +744,7 @@ class DebugUI { boolean first = true; int cubeNum = 0; for (int cube : channel) { - if (cube == 0) { + if (cube <= 0) { break; } xPos += debugXSpacing;