|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnanovm.nibo.drivers.DistanceSensor
public class DistanceSensor
Encapsulates the information about the five IR-reflex-sensors. You will have to call the update Method first to get actual values.
Field Summary | |
---|---|
static int |
FRONT
ID of the front IR-sensor |
static int |
LEFT
ID of the left IR-sensor |
static int |
LEFT_FRONT
ID of the left front IR-sensor |
static int |
MAXIMUM
Maximum value from IR-sensor |
static int |
MINIMUM
Minimum value from IR-sensor |
static int |
RIGHT
ID of the right IR-sensor |
static int |
RIGHT_FRONT
ID of the right front IR-sensor |
Constructor Summary | |
---|---|
DistanceSensor()
|
Method Summary | |
---|---|
static boolean |
getEnabled()
get status of IR-reflex-sensors |
static int |
getSensor(int sensor)
get the value of the IR-reflex-sensor with the given ID |
static void |
setEnabled(boolean enable)
enable and disable the IR-reflex-sensors |
static void |
update()
update all values |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAXIMUM
public static final int MINIMUM
public static final int LEFT
public static final int LEFT_FRONT
public static final int FRONT
public static final int RIGHT_FRONT
public static final int RIGHT
Constructor Detail |
---|
public DistanceSensor()
Method Detail |
---|
public static void update()
public static int getSensor(int sensor)
sensor
- ID of the IR-sensor
public static void setEnabled(boolean enable)
enable
- true to enable sensorspublic static boolean getEnabled()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |