Encoders

object Encoders : API

An API for manipulating wheels using encoders.

This helps when writing autonomous that needs to move a specific distance, or turn a specific amount.

Requires the TriWheels API.

See also

Types

Link copied to clipboard

An enum representing which axis a robot will drive along in driveTo.

Properties

Link copied to clipboard
open override val isLinear: Boolean = true

Specifies whether this API requires a LinearOpMode to function.

Functions

Link copied to clipboard
open override fun dependencies(): Set<TriWheels>

A function that returns a Set of all other APIs it depends on to function.

Link copied to clipboard
fun driveTo(direction: Encoders.Direction, inches: Double)

Drives the robot in a given direction a certain amount of inches.

Link copied to clipboard
fun driveTo2(direction: Encoders.Direction, inches: Double)
Link copied to clipboard
open fun init(opMode: OpMode)

Initializes the API to use the given opMode.

Link copied to clipboard
fun spinTo(degrees: Double)

Spins the robot a certain number of degrees.

Link copied to clipboard
fun spinTo2(degrees: Double)