repositories
/
SugarCubes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Lots of code cleanup, removed Panda code, all grizzly, cleaning up mapping
[SugarCubes.git]
/
TestPatterns.pde
diff --git
a/TestPatterns.pde
b/TestPatterns.pde
index 6a662f248fb5dfe4f1152eff98f0f35e9a6a6ee0..80754a6f1a9a4c21846da78226fdf00cbedcce02 100644
(file)
--- a/
TestPatterns.pde
+++ b/
TestPatterns.pde
@@
-314,15
+314,11
@@
class MappingTool extends TestPattern {
public boolean channelModeBlue = false;
private final int numChannels;
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);
super(glucose);
- this.pandaMappings = pandaMappings;
- numChannels =
pandaMappings.length * PandaMapping.CHANNELS_PER_BOARD
;
+ // TODO(mcslee): port channels to grizzly
+ numChannels =
0
;
setChannel();
}
setChannel();
}
@@
-331,21
+327,12
@@
class MappingTool extends TestPattern {
}
private void setChannel() {
}
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) {
}
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() {
}
private void printInfo() {
@@
-440,7
+427,9
@@
class MappingTool extends TestPattern {
}
public void setChannel(int index) {
}
public void setChannel(int index) {
- channelIndex = index % numChannels;
+ if (numChannels > 0) {
+ channelIndex = index % numChannels;
+ }
setChannel();
}
setChannel();
}