|
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.ScribblerLineSensor
public class ScribblerLineSensor
Sensor for the line sensor on the bottom of the Scribbler.
For each sensor, a value of true indicates the presence of a dark line and false indicates the absence of a dark line.
The line sensors are on the bottom near 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 line sensors are on the bottom near the rear of the robot. The left-to-right ordering of the line sensors is presented with respect to the robot's current orientation.
| Field Summary | |
|---|---|
static int |
LEFT
Constant for the index of the left line sensor. |
static int |
RIGHT
Constant for the index of the right line 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 | |
|---|---|
ScribblerLineSensor()
Construct a new ScribblerLineSensor. |
|
| Method Summary | |
|---|---|
protected DeviceDisplay[] |
createGUIObjects()
Get the GUI for the ScribblerLineSensor. |
void |
freeze()
This method does nothing. |
boolean |
getLeftSensor()
Get the current value of the left line sensor. |
boolean |
getRightSensor()
Get the current value of the right line sensor. |
void |
readStateFromRobot()
Send a message to the Scribbler to read the state of the line 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 ScribblerLineSensor()
| 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 | |||||||||