Spindexer

class Spindexer(hardwareMap: HardwareMap, motorName: String = Constants.HardwareNames.SPINDEXER_MOTOR, intakeSensorName: String = Constants.HardwareNames.INTAKE_SENSOR, _artifacts: Array<Artifact?> = Array(3) { null }) : HardwareComponent

Constructors

Link copied to clipboard
constructor(hardwareMap: HardwareMap, motorName: String = Constants.HardwareNames.SPINDEXER_MOTOR, intakeSensorName: String = Constants.HardwareNames.INTAKE_SENSOR, _artifacts: Array<Artifact?> = Array(3) { null })

Types

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val name: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open override fun init()
Link copied to clipboard
fun moveManual(power: Double)
Link copied to clipboard

Moves the motor to the next open intake position if available.

Link copied to clipboard
fun moveToNextOuttake(artifact: Artifact? = null): Boolean

Moves the motor to the next outtake position in sequence.

Link copied to clipboard

Pops (removes and returns) the artifact at the current outtake position.

Link copied to clipboard
Link copied to clipboard
fun reset()
Link copied to clipboard
fun resetMotorPosition(resetTicks: Int = 0)
Link copied to clipboard
fun setArtifacts(vararg artifacts: Artifact?)
Link copied to clipboard
open override fun update()

Updates the motor position to match the desired motor state. Checks for new artifacts if in an intake position.