X-Git-Url: https://git.piment-noir.org/?p=SugarCubes.git;a=blobdiff_plain;f=TestPatterns.pde;h=80754a6f1a9a4c21846da78226fdf00cbedcce02;hp=6a662f248fb5dfe4f1152eff98f0f35e9a6a6ee0;hb=e037f60f518373c3bb952f79a2ae66950e55a52f;hpb=344908672b7cfe1efba03f739ef945601dae1b8e diff --git a/TestPatterns.pde b/TestPatterns.pde index 6a662f2..80754a6 100644 --- a/TestPatterns.pde +++ b/TestPatterns.pde @@ -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(); }