diff options
author | Christopher Baines <cbaines8@gmail.com> | 2011-09-02 11:58:53 +0100 |
---|---|---|
committer | Christopher Baines <cbaines8@gmail.com> | 2011-09-02 11:58:53 +0100 |
commit | 010c8cf9a685370e7e7890cbb2f508f3f5db65b7 (patch) | |
tree | 423e5d6f01c6536668a3728ea3c2fdb79f4c50ca /PunchingBag | |
parent | 68c2bc40f25810ce01bdebcd3bfe90b7a76b5413 (diff) | |
download | punchingbag-010c8cf9a685370e7e7890cbb2f508f3f5db65b7.tar punchingbag-010c8cf9a685370e7e7890cbb2f508f3f5db65b7.tar.gz |
Fixed issues arrising from the merge.
Diffstat (limited to 'PunchingBag')
-rw-r--r-- | PunchingBag/src/ButtonListener.java | 2 | ||||
-rw-r--r-- | PunchingBag/src/PunchingBag.java | 17 |
2 files changed, 8 insertions, 11 deletions
diff --git a/PunchingBag/src/ButtonListener.java b/PunchingBag/src/ButtonListener.java index 9514da6..c2a4961 100644 --- a/PunchingBag/src/ButtonListener.java +++ b/PunchingBag/src/ButtonListener.java @@ -2,6 +2,4 @@ import java.util.EventListener; interface ButtonListener extends EventListener { - void contact(Contact c); - } diff --git a/PunchingBag/src/PunchingBag.java b/PunchingBag/src/PunchingBag.java index b8cbfce..77f9325 100644 --- a/PunchingBag/src/PunchingBag.java +++ b/PunchingBag/src/PunchingBag.java @@ -25,7 +25,7 @@ public class PunchingBag implements Runnable { * the <code>ActionListener</code> to be added */ public void addButtonListener(ButtonListener l) { - listenerList.add(ButtonListener.class, l); + buttonListenerList.add(ButtonListener.class, l); } public void setLED(byte x, byte y, byte intensity) { @@ -67,8 +67,8 @@ public class PunchingBag implements Runnable { drawnSomething = false; for (double i = 0; i < 360; i++) { - int x = x + (int) Math.round(currentWidth * Math.cos(i)); - int y = y + (int) Math.round(currentWidth * Math.sin(i)); + //int x = x + (int) Math.round(currentWidth * Math.cos(i)); + //int y = y + (int) Math.round(currentWidth * Math.sin(i)); if (x >= 0 && x <= 8 && y >= 0 && y <= 19) { // setLED(x, y, colour); @@ -88,18 +88,17 @@ public class PunchingBag implements Runnable { } -} + void CirclePulsate (int x, int y) { for ( int i= 0 ; i<= 15 ; i++ ) { -matrix. Clear ( ) ; +/*matrix. Clear ( ) ; matrix. DrawEllipse ( AS1107:: Maxx / x , y ,i,i ) ; matrix. Update ( ) ; -delay ( d ) ; - - buttonListenerList.add(ButtonListener.class, l); - } +delay ( d ) ;*/ +} +} public void addLEDChangeListener(ButtonListener l) { ledListenerList.add(ButtonListener.class, l); |