koala
Class KoalaMotorController

java.lang.Object
  extended by koala.KoalaMotorController
All Implemented Interfaces:
KoalaMotors

public class KoalaMotorController
extends java.lang.Object
implements KoalaMotors

Makes motor control smoother by gradually changing speed when setSpeed() is called. Other methods delegate to Koala.


Constructor Summary
KoalaMotorController(KoalaMotors robot)
           
 
Method Summary
 int getLeftMotorCurrent()
           
 int getLeftMotorPosition()
           
 int getLeftMotorSpeed()
           
 int getRightMotorCurrent()
           
 int getRightMotorPosition()
           
 int getRightMotorSpeed()
           
 boolean leftMotorError()
           
 int moveForward(double distance)
           
 boolean rightMotorError()
           
 int rotate(double angle)
           
 int setMotorPosition(int left, int right)
           
 int setSpeed(int left, int right)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KoalaMotorController

public KoalaMotorController(KoalaMotors robot)
Method Detail

setSpeed

public int setSpeed(int left,
                    int right)
Specified by:
setSpeed in interface KoalaMotors

rotate

public int rotate(double angle)
Specified by:
rotate in interface KoalaMotors

moveForward

public int moveForward(double distance)
Specified by:
moveForward in interface KoalaMotors

getLeftMotorSpeed

public int getLeftMotorSpeed()
Specified by:
getLeftMotorSpeed in interface KoalaMotors

getRightMotorSpeed

public int getRightMotorSpeed()
Specified by:
getRightMotorSpeed in interface KoalaMotors

getLeftMotorPosition

public int getLeftMotorPosition()
Specified by:
getLeftMotorPosition in interface KoalaMotors

getRightMotorPosition

public int getRightMotorPosition()
Specified by:
getRightMotorPosition in interface KoalaMotors

setMotorPosition

public int setMotorPosition(int left,
                            int right)
Specified by:
setMotorPosition in interface KoalaMotors

getLeftMotorCurrent

public int getLeftMotorCurrent()
Specified by:
getLeftMotorCurrent in interface KoalaMotors

getRightMotorCurrent

public int getRightMotorCurrent()
Specified by:
getRightMotorCurrent in interface KoalaMotors

leftMotorError

public boolean leftMotorError()
Specified by:
leftMotorError in interface KoalaMotors

rightMotorError

public boolean rightMotorError()
Specified by:
rightMotorError in interface KoalaMotors