Package com.pocolifo.robobase.motor
Class Wheel
- java.lang.Object
-
- com.pocolifo.robobase.motor.Motor
-
- com.pocolifo.robobase.motor.Wheel
-
-
Field Summary
Fields Modifier and Type Field Description double
circumferenceCm
The circumference of this wheel, in centimeters.int
targetPosition
The target encoder positiondouble
wheelDiameterCm
The diameter of this wheel, in centimeters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setDriveTarget(double centimeters)
Sets how far the motor should move (in centimeters).-
Methods inherited from class com.pocolifo.robobase.motor.Motor
close, drive, stopMoving
-
-
-
-
Constructor Detail
-
Wheel
public Wheel(com.qualcomm.robotcore.hardware.DcMotor motor, int tickCount, double wheelDiameterCm)
Instantiate aWheel
.- Parameters:
motor
- TheDcMotor
that is associated with thisMotor
.tickCount
- The number of ticks for a full revolution of this motor.wheelDiameterCm
- The diameter of the wheel in real life, in centimeters.
-
-