diff options
author | Christopher Baines <cbaines8@gmail.com> | 2011-09-15 13:26:30 +0100 |
---|---|---|
committer | Christopher Baines <cbaines8@gmail.com> | 2011-09-15 13:26:30 +0100 |
commit | 131339490d652938431aba02238c4ed5f9e096c9 (patch) | |
tree | 2ff788b364b71ad9c8c0f5713edd5fe85b98322d /PunchingBag/src | |
parent | f9c1cfa97d8783f776891a02d25494c11e92ab04 (diff) | |
download | punchingbag-131339490d652938431aba02238c4ed5f9e096c9.tar punchingbag-131339490d652938431aba02238c4ed5f9e096c9.tar.gz |
Slight action change, slightly more docs.
Diffstat (limited to 'PunchingBag/src')
-rw-r--r-- | PunchingBag/src/uk/ac/open/punchingbag/PunchingBag.java | 9 | ||||
-rw-r--r-- | PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/PunchingBag/src/uk/ac/open/punchingbag/PunchingBag.java b/PunchingBag/src/uk/ac/open/punchingbag/PunchingBag.java index d815ec3..b597cbc 100644 --- a/PunchingBag/src/uk/ac/open/punchingbag/PunchingBag.java +++ b/PunchingBag/src/uk/ac/open/punchingbag/PunchingBag.java @@ -231,6 +231,13 @@ public class PunchingBag implements Runnable { } } + /** + * Sets a LED on the grid to the specified colour, either use + * + * @param x + * @param y + * @param colour + */ public void setLED(int x, int y, Color colour) { runningEffects.add(new Point(x, y, colour)); } @@ -887,7 +894,7 @@ public class PunchingBag implements Runnable { System.out.println("Button: " + (System.currentTimeMillis() - beginTimeButtonIn)); calculateRawLeds(); - String str; + //String str; //for (int i = 0; i < (6 * 8); i++) { // printByte(rawLeds[i]); //} diff --git a/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java b/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java index 5eb57c6..d05016d 100644 --- a/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java +++ b/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java @@ -589,9 +589,9 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener, @Override public void buttonPressed(int x, int y) { System.out.println("Button Pressed: " + x + " " + y); - bag.circleExpand(x, y, 16); - // bag.setLED(x, y, PunchingBag.Colour.Red); - // bag.noise(new Rectangle(0, 0, 9, 20), 5000); + //bag.circleExpand(x, y, 16); + //bag.setLED(x, y, Color.red); + bag.noise(new Rectangle(0, 0, 9, 20), 5000); /* * for (int bx=0; bx<bag.ledWidth; bx++) { for (int by=0; * by<bag.ledHeight; by++) { bag.setLED(bx, by, PunchingBag.Colour.Red); |