Tasks

open inner class Tasks

Tasks for HoldableActuator, access with tasks.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun ceil(): Task
Send the actuator to the top limit, using the constants for homing.
Link copied to clipboard
open fun control(@NonNull powerSupplier: DoubleSupplier): Task
Controls the actuator with a supplier of power.
Link copied to clipboard
open fun delta(deltaPosition: Int): Task
Commands the actuator to go to a particular encoder position as an offset of the current position when this task is executed.
Link copied to clipboard
open fun deltaProfiled(deltaPosition: Int): Task
Commands the actuator to go to a particular encoder position as an offset of the current position when this task is executed.
Link copied to clipboard
open fun goTo(@NonNull limitSwitch: TouchSensor): Task
Set the position of the actuator based on a mapped limit switch.
open fun goTo(targetPosition: Int): Task
Commands the actuator to go to a particular encoder tick reading by advancing or retreating the motor.
Link copied to clipboard
open fun goToProfiled(@NonNull limitSwitch: TouchSensor): Task
Set the position of the actuator based on a mapped limit switch.
open fun goToProfiled(targetPosition: Int): Task
Commands the actuator to go to a particular encoder tick reading by advancing or retreating the motor.
Link copied to clipboard
open fun home(): Task
Home the actuator based on encoders against a hard stop or limit switch.
Link copied to clipboard
open fun run(power: Double): Task
Continuously commands the actuator to control with this power value.
Link copied to clipboard
open fun runFor(@NonNull time: Measure<Time>, pwr: Double): Task
Run the actuator for a certain amount of time using raw power.
Link copied to clipboard
open fun setPower(pwr: Double): Task
Instantly set the power of the actuator.