From 63f8fd609fc2966eb7bf2ddf53a3241f70a02689 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 2 Sep 2011 12:08:10 +0100 Subject: Removed old SetLed function, changed Ripple class as result. --- PunchingBag/src/PunchingBag.java | 12 ++++-------- 1 file 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++) { -- cgit v1.2.3