|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
dlife.robot.Device
dlife.robot.ArraySensor<Boolean>
dlife.robot.scribbler.ScribblerObstacleSensor
public class ScribblerObstacleSensor
Sensor Scribbler's obstacle sensors.

For each sensor, a value of true indicates the presence of an obstacle in front of the sensor and false indicates the absence of an obstacle.
The obstacle sensors are on the front of the scribbler in the default orientation (Scribbler.FLUKE_AT_REAR). If the robot's orientation is changed to Scribbler.FLUKE_AT_FRONT then the obstacle sensors are at the rear of the robot. The left-to-right ordering of the obstacle sensors is presented with respect to the robot's current orientation.
| Field Summary | |
|---|---|
static int |
LEFT
Constant for the index of the left obstacle sensor. |
static int |
RIGHT
Constant for the index of the right obstacle sensor. |
| Fields inherited from class dlife.robot.ArraySensor |
|---|
length, values |
| Fields inherited from class dlife.robot.Device |
|---|
DEFAULT_GUI_UPDATE_DELAY, DEFAULT_READ_DELAY, myRobot, readCount |
| Constructor Summary | |
|---|---|
ScribblerObstacleSensor()
Construct a new ScribblerObstacleSensor. |
|
| Method Summary | |
|---|---|
protected DeviceDisplay[] |
createGUIObjects()
Get the GUI for the ScribblerObstacleSensor. |
void |
freeze()
This method does nothing. |
boolean |
getLeftSensor()
Get the current value of the left obstacle sensor. |
boolean |
getRightSensor()
Get the current value of the right obstacle sensor. |
void |
readStateFromRobot()
Send a message to the Scribbler to read the state of the obstacle sensor and update the values of this sensor. |
| 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.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LEFT
public static final int RIGHT
| Constructor Detail |
|---|
public ScribblerObstacleSensor()
| Method Detail |
|---|
public void freeze()
freeze in class Devicepublic void readStateFromRobot()
readStateFromRobot in class Devicepublic boolean getLeftSensor()
public boolean getRightSensor()
protected DeviceDisplay[] createGUIObjects()
createGUIObjects in class Device
|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||