lejos.nxt
Class Motor.Regulator

java.lang.Object
  extended by java.lang.Thread
      extended by 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


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Motor.Regulator()
           
 
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, getName, getPriority, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, setDaemon, setName, setPriority, sleep, start, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Motor.Regulator

public Motor.Regulator()
Method Detail

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