|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlejos.robotics.RotatingRangeScanner
public class RotatingRangeScanner
Implementation of RangeScanner with a rotating ultrasonic sensor or other range finder
Field Summary | |
---|---|
protected float[] |
angles
|
protected RegulatedMotor |
head
|
protected int |
MAX_RELIABLE_RANGE_READING
|
protected RangeFinder |
rangeFinder
|
protected RangeReadings |
readings
|
protected int |
ZERO
|
Constructor Summary | |
---|---|
RotatingRangeScanner(RegulatedMotor head,
RangeFinder rangeFinder)
The constructor specifies the motor and range finder used |
Method Summary | |
---|---|
RangeFinder |
getRangeFinder()
returns the rangeFinder - allows other objects to get a range value. |
RangeReadings |
getRangeValues()
Returns a set of Range Readings taken the angles specified. |
void |
setAngles(float[] angles)
set the angles to be used by the getRangeValues() method |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final int MAX_RELIABLE_RANGE_READING
protected final int ZERO
protected RangeReadings readings
protected RangeFinder rangeFinder
protected RegulatedMotor head
protected float[] angles
Constructor Detail |
---|
public RotatingRangeScanner(RegulatedMotor head, RangeFinder rangeFinder)
head
- the motor that rotates the sensorrangeFinder
- the range finderMethod Detail |
---|
public RangeReadings getRangeValues()
getRangeValues
in interface RangeScanner
public void setAngles(float[] angles)
setAngles
in interface RangeScanner
angles
- public RangeFinder getRangeFinder()
getRangeFinder
in interface RangeScanner
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |