MotorToVelocity
constructor(motor: DcMotorEx, targetVelocity: Double, controller: PIDFController, subsystem: Subsystem, outCondition: () -> Boolean = { abs(motor.velocity)-targetVelocity < 10 })
constructor(motor: DcMotorEx, targetVelocity: Double, controller: PIDFController, subsystems: Set<Subsystem>)
constructor(motor: DcMotorEx, targetVelocity: Double, controller: PIDFController, subsystem: Subsystem)
constructor(motor: DcMotorEx, targetVelocity: Double, controller: PIDFController, subsystems: Set<Subsystem>, outCondition: () -> Boolean = { abs(motor.velocity)-targetVelocity < 10 })
Parameters
motor
the motor to control
targetVelocity
the target velocity
controller
the controller to implement
subsystems
the list of subsystems this command interacts with (should be whatever subsystem holds this command)
outCondition
will be evaluated every update, and the command will stop once it returns true