public class LightScanner
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected RegulatedMotor |
head |
Constructor and Description |
---|
LightScanner(RegulatedMotor headMotor,
LightDetector lightDetector,
int minBeaconLight,
int background)
Specify the hardware for this object.
|
Modifier and Type | Method and Description |
---|---|
RegulatedMotor |
getMotor() |
void |
halt() |
RangeReadings |
scanLight(float startAngle,
float endAngle,
int direction,
int numReadings)
Perform a scan for a number of light beacons within the arc defined by the start
and end angles in the specified direction.
|
void |
setSpeed(int speed) |
protected RegulatedMotor head
public LightScanner(RegulatedMotor headMotor, LightDetector lightDetector, int minBeaconLight, int background)
headMotor
- lightDetector
- minBeaconLight
- background
- public void setSpeed(int speed)
public void halt()
public RangeReadings scanLight(float startAngle, float endAngle, int direction, int numReadings)
startAngle
- of the arcendAngle
- of the arcdirection
- of the scan. +1 = increasing tacho count of motor.numReadings
- public RegulatedMotor getMotor()