lejos.nxt
Class Motor.Regulator
java.lang.Object
java.lang.Thread
lejos.nxt.Motor.Regulator
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- Motor
public class Motor.Regulator
- extends Thread
inner class to regulate speed; also stop motor at desired rotation angle
Method Summary |
void |
reset()
called by forward() backward() and reverseDirection()
resets parameters for speed regulation |
void |
run()
Monitors time and tachoCount to regulate speed and stop motor rotation at limit angle |
Methods inherited from class java.lang.Thread |
currentThread, getPriority, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, setDaemon, setPriority, sleep, start, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Motor.Regulator
public Motor.Regulator()
reset
public void reset()
- called by forward() backward() and reverseDirection()
resets parameters for speed regulation
run
public void run()
- Monitors time and tachoCount to regulate speed and stop motor rotation at limit angle
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread