CuttleEncoder

Rotary encoder connected through a motor encoder port

Constructors

Link copied to clipboard
constructor(revHub: CuttleRevHub, port: Int, countsPerRevolution: Double)

Properties

Link copied to clipboard
open var hub: CuttleRevHub
Link copied to clipboard
open var mPort: Int

Functions

Link copied to clipboard
open fun getCounts(): Int
Get the number of counts that the encoder has turned
Link copied to clipboard
open fun getRotation(): Double
Get the rotation of the encoder in radians
Link copied to clipboard
Get the velocity of the encoder without regard to velocity overflow
Link copied to clipboard
open fun getVelocity(): Double
Get the velocity of the encoder with velocity overflow corrected.
Link copied to clipboard
open fun setDirection(direction: Direction)
Set the direction of the encoder.