ResetGyro

class ResetGyro(swerveDrive: SwerveDrive, angle: Rotation2d = Rotation2d()) : Command

Command to reset the gyro heading to zero or a specific angle.

Usage Example:

val resetGyroCommand = ResetGyro(drive)
controller.start().onTrue(resetGyroCommand)

Constructors

Link copied to clipboard
constructor(swerveDrive: SwerveDrive, angle: Rotation2d = Rotation2d())

Properties

Link copied to clipboard
open val interruptionBehavior: Command.InterruptionBehavior?
Link copied to clipboard
open override val isFinished: Boolean
Link copied to clipboard
Link copied to clipboard
open var name: String?
Link copied to clipboard
open val requirements: Set<Subsystem?>?
Link copied to clipboard
open var subsystem: String?

Functions

Link copied to clipboard
fun addRequirements(vararg requirements: Subsystem?)
fun addRequirements(requirements: Collection<Subsystem?>?)
Link copied to clipboard
open fun alongWith(vararg parallel: Command?): ParallelCommandGroup?
Link copied to clipboard
open fun andThen(vararg next: Command?): SequentialCommandGroup?
open fun andThen(toRun: Runnable?, vararg requirements: Subsystem?): SequentialCommandGroup?
Link copied to clipboard
open fun asProxy(): ProxyCommand?
Link copied to clipboard
open fun beforeStarting(before: Command?): SequentialCommandGroup?
open fun beforeStarting(toRun: Runnable?, vararg requirements: Subsystem?): SequentialCommandGroup?
Link copied to clipboard
open fun cancel()
Link copied to clipboard
open fun deadlineFor(vararg parallel: Command?): ParallelDeadlineGroup?
Link copied to clipboard
open fun deadlineWith(vararg parallel: Command?): ParallelDeadlineGroup?
Link copied to clipboard
open fun end(interrupted: Boolean)
Link copied to clipboard
open fun execute()
Link copied to clipboard
open fun finallyDo(end: BooleanConsumer?): WrapperCommand?
open fun finallyDo(end: Runnable?): WrapperCommand?
Link copied to clipboard
open fun handleInterrupt(handler: Runnable?): WrapperCommand?
Link copied to clipboard
open fun hasRequirement(requirement: Subsystem?): Boolean
Link copied to clipboard
open fun ignoringDisable(doesRunWhenDisabled: Boolean): WrapperCommand?
Link copied to clipboard
open override fun initialize()
Link copied to clipboard
open fun initSendable(builder: SendableBuilder?)
Link copied to clipboard
operator fun Command.invoke()

Operator invoke implementation for Command.

Link copied to clipboard
open override fun isFinished(): Boolean
Link copied to clipboard
open fun onlyIf(condition: BooleanSupplier?): ConditionalCommand?
Link copied to clipboard
open fun onlyWhile(condition: BooleanSupplier?): ParallelRaceGroup?
Link copied to clipboard
open fun raceWith(vararg parallel: Command?): ParallelRaceGroup?
Link copied to clipboard
open fun repeatedly(): RepeatCommand?
Link copied to clipboard
Link copied to clipboard
open fun schedule()
Link copied to clipboard
fun Command.scheduleIf(condition: Boolean)

Schedule this command when the provided condition is true.

Link copied to clipboard
open fun unless(condition: BooleanSupplier?): ConditionalCommand?
Link copied to clipboard
open fun until(condition: BooleanSupplier?): ParallelRaceGroup?
Link copied to clipboard
open fun withDeadline(deadline: Command?): ParallelDeadlineGroup?
Link copied to clipboard
open fun withInterruptBehavior(interruptBehavior: Command.InterruptionBehavior?): WrapperCommand?
Link copied to clipboard
open fun withName(name: String?): WrapperCommand?
Link copied to clipboard
open fun withTimeout(time: Time?): ParallelRaceGroup?
open fun withTimeout(seconds: Double): ParallelRaceGroup?