Class MoveTurretToAngleCommand
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
frc.robot.shared.commands.AbstractSubsystemCommand<TSubsystem>
frc.robot.shared.commands.AbstractSetAndSeekCommand<TurretSubsystem>
frc.robot.subsystems.turret.commands.MoveTurretToAngleCommand
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
Drives the turret toward a target angle using its trapezoidal profile. Use this for preset positions or coarse moves where hitting the travel
limits is acceptable.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.Command.InterruptionBehavior -
Field Summary
Fields inherited from class frc.robot.shared.commands.AbstractSubsystemCommand
log, subsystem -
Constructor Summary
ConstructorsConstructorDescriptionMoveTurretToAngleCommand(TurretSubsystem turretSubsystem, double targetDegrees) Builds a profiled turret move command that drives to a fixed angle.MoveTurretToAngleCommand(TurretSubsystem turretSubsystem, Supplier<Double> targetDegreesSupplier) Builds a profiled turret move command that reads the target angle from a supplier. -
Method Summary
Methods inherited from class frc.robot.shared.commands.AbstractSetAndSeekCommand
end, execute, isFinished, onInitializeMethods inherited from class frc.robot.shared.commands.AbstractSubsystemCommand
initializeMethods inherited from class edu.wpi.first.wpilibj2.command.Command
addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, deadlineWith, finallyDo, finallyDo, getInterruptionBehavior, getName, getRequirements, getSubsystem, handleInterrupt, hasRequirement, ignoringDisable, initSendable, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, runsWhenDisabled, schedule, setName, setSubsystem, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeout
-
Constructor Details
-
MoveTurretToAngleCommand
public MoveTurretToAngleCommand(TurretSubsystem turretSubsystem, Supplier<Double> targetDegreesSupplier) Builds a profiled turret move command that reads the target angle from a supplier.- Parameters:
turretSubsystem- turret subsystem to controltargetDegreesSupplier- supplier providing the desired turret angle in degrees
-
MoveTurretToAngleCommand
Builds a profiled turret move command that drives to a fixed angle.- Parameters:
turretSubsystem- turret subsystem to controltargetDegrees- desired turret angle in degrees
-