dlife.robot.aibo
Class AiboChinButton
java.lang.Object
java.util.Observable
dlife.robot.Device
dlife.robot.ArraySensor<Boolean>
dlife.robot.aibo.AiboChinButton
public class AiboChinButton
- extends ArraySensor<Boolean>
A collection containing the button located on the physical Aibo's chin. The
chin button's value is either true (pressed) or false (not pressed).
- Version:
- Oct 3, 2008, Jun 14, 2010
- Author:
- Alex Diehl, Nate Mitchell, Grant Braught
|
Field Summary |
static int |
CHIN
The index of the chin button value in the values array of this
ArraySensor. |
|
Constructor Summary |
AiboChinButton()
Construct a new AiboChinButton sensor. |
|
Method Summary |
protected DeviceDisplay[] |
createGUIObjects()
Build the GUI for this AiboChinButton sensor. |
void |
freeze()
Does nothing. |
boolean |
isPressed()
Determine if the Aibo's chin button is pressed. |
void |
readStateFromRobot()
Uses the getButton method to retrieve the value from the robot and stores
it in the values array for later access |
| Methods inherited from class dlife.robot.ArraySensor |
getAverage, getAverage, getMaximum, getMaximum, getMaximumIndex, getMaximumIndex, getMinimum, getMinimum, getMinimumIndex, getMinimumIndex, getNumValues, getSubset, getValue, getValues |
| Methods inherited from class dlife.robot.Device |
getAutoRead, getGUI, getGUIUpdateDelay, getReadDelay, getRobot, getSensorReadCount, getSensorReadRate, setAutoRead, setGUIUpdateDelay, setReadDelay, setRobot, shutDown, startAutoReadTimer, startUp, stopAutoReadTimer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CHIN
public static final int CHIN
- The index of the chin button value in the values array of this
ArraySensor.
- See Also:
- Constant Field Values
AiboChinButton
public AiboChinButton()
- Construct a new AiboChinButton sensor.
freeze
public void freeze()
- Does nothing.
- Specified by:
freeze in class Device
readStateFromRobot
public void readStateFromRobot()
- Uses the getButton method to retrieve the value from the robot and stores
it in the values array for later access
- Specified by:
readStateFromRobot in class Device
isPressed
public boolean isPressed()
- Determine if the Aibo's chin button is pressed.
- Returns:
- true if the chin button is pressed, false if not.
createGUIObjects
protected DeviceDisplay[] createGUIObjects()
- Build the GUI for this AiboChinButton sensor.
- Specified by:
createGUIObjects in class Device
- Returns:
- an array of DeviceDisplay subclass objects that make up the GUI
for this Device.