X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fobits%2FAtmelSerial.java;h=24e297604d2bb52f49db474d829102f27a126942;hb=7f6492ec8a39f2bb510d5be0b92031f231a2a935;hp=a4a0f22a4be126391ab792118e6a921467e7b5db;hpb=e847739b51f485baab505becdf4241471017d207;p=slipway.git diff --git a/src/edu/berkeley/obits/AtmelSerial.java b/src/edu/berkeley/obits/AtmelSerial.java index a4a0f22..24e2976 100644 --- a/src/edu/berkeley/obits/AtmelSerial.java +++ b/src/edu/berkeley/obits/AtmelSerial.java @@ -33,7 +33,8 @@ public class AtmelSerial { public static int PIPELEN=20; public static void main(String[] s) throws Exception { //AvrDrone device = new AvrDrone(detectObitsPort()); - AvrDrone device = new AvrDrone(); + //AvrDrone device = new AvrDrone(); + AvrDrone device = new AvrDrone(new FtdiBoard()); At40k at40k = new At40k.At40k10(device); try { long begin = System.currentTimeMillis(); @@ -493,6 +494,15 @@ public class AtmelSerial { at40k.cell(6,13).yo(false); at40k.cell(7,12).xi(SE); + for(int i=0; i<24; i++) { + at40k.iob_bot(i, true).enableOutput(NORTH); + at40k.iob_bot(i, false).enableOutput(NW); + at40k.cell(i, 0).xlut(0xff); + at40k.cell(i, 0).ylut(0xff); + } + + device.flush(); + Gui vis = new Gui(at40k, device); Frame fr = new Frame(); fr.addKeyListener(vis); @@ -506,10 +516,12 @@ public class AtmelSerial { synchronized(AtmelSerial.class) { AtmelSerial.class.wait(); } + Visualizer v = new Visualizer(at40k, device); v.show(); v.setSize(1380, 1080); At40k.Cell cell = at40k.cell(4, 23); + Image img = v.createImage(v.getWidth(), v.getHeight()); /* int x = 1; @@ -777,6 +789,7 @@ public class AtmelSerial { cell.xlut(0xff); cell.ylut(0xff); drawCell(getGraphics(), selx, sely); + drone.flush(); break; } case 'i': { @@ -888,6 +901,7 @@ public class AtmelSerial { cell.xlut(0x00); cell.ylut(0x00); drawCell(getGraphics(), selx, sely); + drone.flush(); break; } }