X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=_PandaDriver.pde;h=5d8ad249bbe3171446033c720c1d15f60cfda226;hb=270a8b44cd8296bb40fa74e4fcf2e7f7c4f1192c;hp=2d28cd693e12bea5c300d0c604dcfbe0ba07f40a;hpb=d626bc9b0197a1b5fd51a86f33f666a2a46579a2;p=SugarCubes.git diff --git a/_PandaDriver.pde b/_PandaDriver.pde index 2d28cd6..5d8ad24 100644 --- a/_PandaDriver.pde +++ b/_PandaDriver.pde @@ -84,10 +84,17 @@ public static class PandaDriver { * corner of the cube the data wire comes in. */ private final static int[][] CUBE_STRIP_ORDERINGS = new int[][] { +// { 2, 1, 0, 3, 13, 12, 15, 14, 4, 7, 6, 5, 11, 10, 9, 8 }, // FRONT_LEFT +// { 6, 5, 4, 7, 1, 0, 3, 2, 8, 11, 10, 9, 15, 14, 13, 12 }, // FRONT_RIGHT +// { 14, 13, 12, 15, 9, 8, 11, 10, 0, 3, 2, 1, 7, 6, 5, 4 }, // REAR_LEFT +// { 10, 9, 8, 11, 5, 4, 7, 6, 12, 15, 14, 13, 3, 2, 1, 0 }, // REAR_RIGHT + + { 2, 1, 0, 3, 13, 12, 15, 14, 4, 7, 6, 5, 11, 10, 9, 8 }, // FRONT_LEFT { 6, 5, 4, 7, 1, 0, 3, 2, 8, 11, 10, 9, 15, 14, 13, 12 }, // FRONT_RIGHT { 14, 13, 12, 15, 9, 8, 11, 10, 0, 3, 2, 1, 7, 6, 5, 4 }, // REAR_LEFT - { 10, 9, 8, 11, 5, 4, 7, 6, 12, 15, 14, 13, 3, 2, 1, 0 }, // REAR_RIGHT + { 9, 8, 11, 5, 4, 7, 6, 10, 14, 2, 1, 0, 3, 13, 12, 15 }, // REAR_RIGHT + }; private final static int[][] BASS_STRIP_ORDERING = { @@ -264,7 +271,7 @@ public static class PandaDriver { private int mapStrip(Strip s, int direction, int[] points, int pi) { if (direction == FORWARD) { - for (Point p : s.points) { + for (LXPoint p : s.points) { points[pi++] = p.index; } } else if (direction == BACKWARD) { @@ -291,6 +298,10 @@ public static class PandaDriver { } } } + + public boolean isEnabled() { + return this.enabled; + } public void disable() { setEnabled(false);