Now make it move
[SugarCubes.git] / _Overlay.pde
index a07db2c0d5a7ce6db55577d6d12d02eee37a9b6d..29e2353a8a0989627326d30c99947fab0662243a 100644 (file)
@@ -713,10 +713,7 @@ class DebugUI {
   final int DEBUG_STATE_OFF = 2;
   
   DebugUI(PandaMapping[] pandaMappings) {
-    int totalChannels = 0;
-    for (PandaMapping pm : pandaMappings) {
-      totalChannels += pm.channelList.length;
-    }
+    int totalChannels = pandaMappings.length * PandaMapping.CHANNELS_PER_BOARD;
     channelList = new int[totalChannels][];
     int channelIndex = 0;
     for (PandaMapping pm : pandaMappings) {
@@ -731,7 +728,7 @@ class DebugUI {
     }
   }
   
-  void draw() {
+  void draw() {    
     noStroke();
     int xBase = debugX;
     int yPos = debugY;
@@ -747,7 +744,7 @@ class DebugUI {
       boolean first = true;
       int cubeNum = 0;
       for (int cube : channel) {
-        if (cube == 0) {
+        if (cube <= 0) {
           break;
         }
         xPos += debugXSpacing;