|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfrog.plugin.spot.onspot.AccelManager
public class AccelManager
Listens to Switch1 and samples acceleration data when it is pressed. If the
switch is held for longer than about 100ms, it is passed on to the
FilterManager.
There is no Thread in AccelManager. Spots create a thread for
ISwitchListeners whenever the switch is depressed or released. This
class does all the work using that thread.
| Field Summary | |
|---|---|
static int |
DEFAULT_SAMPLE_RATE
Sets the default sample rate by changing what will be put in the timer. |
| Fields inherited from interface frog.plugin.spot.Frog_Spot_Constants |
|---|
CORRUPT_DATA, END_OF_DATA, INT_CORRUPT_DATA, INT_END_OF_DATA, MSG_ACK, MSG_ADD_FILTER, MSG_ALIVE, MSG_DISCONNECT, MSG_DISCOVER, MSG_END_OF_DATA, MSG_ERROR, MSG_GESTURE, MSG_REMOVE_FILTERS, MSG_RESEND, MSG_SAMPLE_RATE, PORT_BCAST, PORT_MAX, PORT_REPLY, PORT_START, SPOT1, SPOT1_PORT, SPOT2, SPOT2_PORT, SPOT3, SPOT3_PORT, SPOT4, SPOT4_PORT, SPOT5, SPOT5_PORT, SPOT6, SPOT6_PORT, SPOT7, SPOT7_PORT, SPOT8, SPOT8_PORT, SPOTB1, SPOTB1_PORT, SPOTB2, SPOTB2_PORT, SPOTB3, SPOTB3_PORT, SPOTB4, SPOTB4_PORT |
| Constructor Summary | |
|---|---|
AccelManager(FrogSpot frog)
Creates the AccelManager with a permanent reference back to the FrogSpot for quick access to its facilities. |
|
| Method Summary | |
|---|---|
void |
kill()
Attempt to unconditionally stop all threads and release all resources. |
void |
setSampleRate(int hertz)
|
void |
switchPressed(ISwitch sw1)
Samples acceleration data whenever the switch is pressed. |
void |
switchReleased(ISwitch sw1)
Deprecated. unused |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_SAMPLE_RATE
FrogSpot.startApp().
| Constructor Detail |
|---|
public AccelManager(FrogSpot frog)
FrogSpot for quick access to its facilities.
frog - reference to the FrogSpot object| Method Detail |
|---|
public void kill()
Killable
kill in interface Killablepublic void setSampleRate(int hertz)
public void switchPressed(ISwitch sw1)
switchPressed in interface ISwitchListenersw1 - switch1 on the SPOTpublic void switchReleased(ISwitch sw1)
switchReleased in interface ISwitchListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||