Lots of code cleanup, removed Panda code, all grizzly, cleaning up mapping
[SugarCubes.git] / _Grizzly.pde
index cc7dec87c235f1400444b948df5acdba13955907..f376fab8cd7d5c8a9048129d297d042c6267b981 100644 (file)
 
 GrizzlyOutput[] buildGrizzlies() throws SocketException, UnknownHostException {
   return new GrizzlyOutput[] {
-    new GrizzlyOutput(lx, "192.168.88.100", 1, 2, 3, 4, 5, 6, 7, 8),
-    new GrizzlyOutput(lx, "192.168.88.101", 9, 10, 11, 12, 13, 14, 15, 16),
+    new GrizzlyOutput(lx, "192.168.88.100", 6, 5, 6, 7, 7, 8, 1, 2, 4, 3, 11, 10, 9, 9, 12, 13),
+    new GrizzlyOutput(lx, "192.168.88.101", 25, 23, 24, 43, 45, 44, 1, 1, 1, 1, 1, 41, 42, 21, 20, 22),
+    new GrizzlyOutput(lx, "192.168.88.104", 26, 28, 27, 19, 18, 17, 1, 1, 18, 19, 15, 16, 14, 29, 30, 31),
+    new GrizzlyOutput(lx, "192.168.88.105", 1, 1, 1, 39, 38, 40, 34, 35, 33, 32, 37, 37, 1, 1, 1, 1),
   };
 }
 
 class GrizzlyOutput extends LXDatagramOutput {
 
+  public final String ipAddress;
+  
   private int frameNumber = 0;
   
   GrizzlyOutput(LX lx, String ipAddress, int ... cubeIndices) throws UnknownHostException, SocketException {
     super(lx);
-    int channelNum = 1;
+    this.ipAddress = ipAddress;
+    int channelNum = 0;
     for (int rawCubeIndex : cubeIndices) {
       if (rawCubeIndex > 0) {
         Cube cube = model.getCubeByRawIndex(rawCubeIndex);
@@ -34,6 +39,7 @@ class GrizzlyOutput extends LXDatagramOutput {
       }
       ++channelNum;
     }
+    this.enabled.setValue(false);
   }
   
   protected void beforeSend(int[] colors) {