Lots of code cleanup, removed Panda code, all grizzly, cleaning up mapping
[SugarCubes.git] / TestPatterns.pde
index 6a662f248fb5dfe4f1152eff98f0f35e9a6a6ee0..80754a6f1a9a4c21846da78226fdf00cbedcce02 100644 (file)
@@ -314,15 +314,11 @@ class MappingTool extends TestPattern {
   public boolean channelModeBlue = false;
   
   private final int numChannels;
-  
-  private final PandaMapping[] pandaMappings;
-  private PandaMapping activePanda;
-  private ChannelMapping activeChannel;
-  
-  MappingTool(GLucose glucose, PandaMapping[] pandaMappings) {
+    
+  MappingTool(GLucose glucose) {
     super(glucose);
-    this.pandaMappings = pandaMappings;
-    numChannels = pandaMappings.length * PandaMapping.CHANNELS_PER_BOARD;
+    // TODO(mcslee): port channels to grizzly
+    numChannels = 0;
     setChannel();
   }
 
@@ -331,21 +327,12 @@ class MappingTool extends TestPattern {
   }
   
   private void setChannel() {
-    activePanda = pandaMappings[channelIndex / PandaMapping.CHANNELS_PER_BOARD];
-    activeChannel = activePanda.channelList[channelIndex % PandaMapping.CHANNELS_PER_BOARD];
+    // TODO(mcslee): port to grizzly
   }
   
   private int indexOfCubeInChannel(Cube c) {
-    if (activeChannel.mode == ChannelMapping.MODE_CUBES) {
-      int i = 1;
-      for (int index : activeChannel.objectIndices) {
-        if ((index >= 0) && (c == model.getCubeByRawIndex(index))) {
-          return i;
-        }
-        ++i;
-      }
-    }
-    return 0;
+    // TODO(mcslee): port to grizzly
+    return -1;
   }
   
   private void printInfo() {
@@ -440,7 +427,9 @@ class MappingTool extends TestPattern {
   }
   
   public void setChannel(int index) {
-    channelIndex = index % numChannels;
+    if (numChannels > 0) {
+      channelIndex = index % numChannels;
+    }
     setChannel();
   }