CuttleMotor

open class CuttleMotor : Motor

Cuttlefish DCMotor implementation.

Constructors

Link copied to clipboard
constructor(revHub: CuttleRevHub, port: Int)
constructor(revHub: CuttleRevHub, port: Int, positionController: MotorPositionController)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var estopped: Boolean
Link copied to clipboard
Link copied to clipboard
open var maxCurrent: Int
Link copied to clipboard
Link copied to clipboard
open var polls_over: Int
Link copied to clipboard
open var power: Double
Link copied to clipboard
open var speed: Double

Functions

Link copied to clipboard
open fun enablePositionPID(enable: Boolean)
Enable or disablePID position hold if motorPositionController has been set
Link copied to clipboard
open fun getCurrent(): Int
Get motor current in milli-amps.
Link copied to clipboard
open fun loop()
Execute the positionController loop
Link copied to clipboard
open fun sendPower()
Send cached motor power to the hub.
Link copied to clipboard
open fun setAngle(angle: Double)
Set the angle of the MotorPositionController.
Link copied to clipboard
open fun setDirection(direction: Direction)
Set the direction of the motor
Link copied to clipboard
open fun setPosition(position: Double)
Set the position of the motor using the MotorPositionController with scale applied
Link copied to clipboard
open fun setPower(power: Double)
Link copied to clipboard
open fun setZeroPowerBehaviour(behaviour: DcMotor.ZeroPowerBehavior)
Set the zero power behaviour of the motor.