diff options
author | Christopher Baines <cbaines8@gmail.com> | 2011-09-02 12:08:10 +0100 |
---|---|---|
committer | Christopher Baines <cbaines8@gmail.com> | 2011-09-02 12:08:10 +0100 |
commit | 63f8fd609fc2966eb7bf2ddf53a3241f70a02689 (patch) | |
tree | 907970f5734527d1e3d722a366360bf83edba667 /PunchingBag | |
parent | 010c8cf9a685370e7e7890cbb2f508f3f5db65b7 (diff) | |
download | punchingbag-63f8fd609fc2966eb7bf2ddf53a3241f70a02689.tar punchingbag-63f8fd609fc2966eb7bf2ddf53a3241f70a02689.tar.gz |
Removed old SetLed function, changed Ripple class as result.
Diffstat (limited to 'PunchingBag')
-rw-r--r-- | PunchingBag/src/PunchingBag.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/PunchingBag/src/PunchingBag.java b/PunchingBag/src/PunchingBag.java index 77f9325..2efe903 100644 --- a/PunchingBag/src/PunchingBag.java +++ b/PunchingBag/src/PunchingBag.java @@ -27,9 +27,9 @@ public class PunchingBag implements Runnable { public void addButtonListener(ButtonListener l) { buttonListenerList.add(ButtonListener.class, l); } - - public void setLED(byte x, byte y, byte intensity) { - + + public void setLED(byte x, byte y, Colour colour) { + leds[x][y] = colour; } public void drawRipple(byte x, byte y, byte intensity) { @@ -71,7 +71,7 @@ public class PunchingBag implements Runnable { //int y = y + (int) Math.round(currentWidth * Math.sin(i)); if (x >= 0 && x <= 8 && y >= 0 && y <= 19) { - // setLED(x, y, colour); + setLED(x, y, colour); drawnSomething = true; } @@ -104,10 +104,6 @@ delay ( d ) ;*/ ledListenerList.add(ButtonListener.class, l); } - public void setLED(byte x, byte y, Colour colour) { - leds[x][y] = colour; - } - private void calculateRawLeds() { for (int y = 0; y <= 18; y++) { for (int x = 0; x <= 6; x++) { |