koala
Class KoalaMotorController
java.lang.Object
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KoalaMotorController
public KoalaMotorController(KoalaMotors robot)
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