|
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<Integer>
dlife.robot.scribbler.ScribblerLightSensor
public class ScribblerLightSensor
Sensor for the Scribbler's light sensors.

The light 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 light sensors are at the rear of the robot. The left-to-right ordering of the light sensors is presented with respect to the robot's current orientation.
| Field Summary | |
|---|---|
static int |
CENTER
Constant for the index of the center light sensor. |
static int |
LEFT
Constant for the index of the left light sensor. |
static int |
RIGHT
Constant for the index of the right light 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 | |
|---|---|
ScribblerLightSensor()
Construct a new ScribblerLineSensor. |
|
| Method Summary | |
|---|---|
protected DeviceDisplay[] |
createGUIObjects()
Get the GUI for the ScribblerLineSensor. |
void |
freeze()
This method does nothing. |
int |
getCenterSensor()
Get the current value of the center light sensor. |
int |
getLeftSensor()
Get the current value of the left light sensor. |
int |
getRightSensor()
Get the current value of the right light 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 CENTER
public static final int RIGHT
| Constructor Detail |
|---|
public ScribblerLightSensor()
| Method Detail |
|---|
public void freeze()
freeze in class Devicepublic void readStateFromRobot()
readStateFromRobot in class Devicepublic int getLeftSensor()
public int getCenterSensor()
public int 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 | |||||||||