public class RotationSensor extends Input
| Constructor and Description |
|---|
RotationSensor(ControlLabInterface controllab,
InputPortEnum port)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAngle()
Return the current angle, a value between 0 and 15.
|
RotationDirectionEnum |
getDirection()
Return the direction, CLOCKWISE or COUNTERCW.
|
SensorTypeEnum |
getSensorType()
Return the type of sensor.
|
void |
reset()
Set the initial value to 0.
|
void |
setAngle(int anAngle)
Set the initial value.
|
addSensorListener, getPort, getSensorListeners, getStatus, getValue, removeSensorListener, setStatus, setValuegetControlLab, setControlLabpublic RotationSensor(ControlLabInterface controllab, InputPortEnum port)
controllab - control labport - input portpublic SensorTypeEnum getSensorType()
getSensorType in class Inputpublic int getAngle()
public void setAngle(int anAngle)
anAngle - the initial value.public void reset()
public RotationDirectionEnum getDirection()
Copyright © 2018. All rights reserved.