open class LinearMotion
A linear motion system driven by a DcMotor.
LinearMotion(motor: DcMotor, range: IntRange? = null, powerMultiplier: Double = 1.0)
A linear motion system driven by a DcMotor. |
val currentPosition: Int
The current position of the linear motion system. |
|
val motor: DcMotor
The motor controlled by the linear motion system. |
|
val powerMultiplier: Double
Constant to multiply powers by. |
|
val range: IntRange?
The range of movement that this system supports. |
fun canMove(power: Double? = null, at: Int? = null): Boolean
Checks whether the linear motion system is allowed to move at a given power. |
|
fun move(power: Double): Unit
Moves the linear motion system at a given power. |
|
fun moveIfAble(power: Double): Boolean
Moves the linear motion system at a given power if it is allowed to; stops it if it is not. |
|
fun moveRaw(power: Double): Unit
Move the linear motion system at a power, bypassing powerMultiplier. |
|
fun stop(): Unit
Stops the linear motion system. |
class ElevatorExtake : LinearMotion, Extake
Extake comprised of an elevator that extends and retracts a rotatable bin. |
|
class ElevatorIntake : LinearMotion, Intake
Intake comprised of an elevator that extends and retracts a rotatable bin and roller. |