Package lejos.hardware.sensor
Class RCXRotationSensor.Reader
- java.lang.Object
-
- java.lang.Thread
-
- lejos.hardware.sensor.RCXRotationSensor.Reader
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- RCXRotationSensor
protected class RCXRotationSensor.Reader extends java.lang.Thread
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()Sensor reader thread.-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Method Detail
-
run
public void run()
Sensor reader thread. Reads the current phase of the sensor and computes the new count. NOTE: There is a problem with this sensor when a read spans the point at which the sensor output changes from one value to another. The result of this can be a "ghost value". For instance if the read occurs when moving from state 2 to state 0 then a false reading of state 1 may be read. To reduce this problem a new state is not accepted until two consecutive reads return the same state.- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread
-
-