Class SwerveSteeringMaintainerCommand
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
xbot.common.command.BaseCommand
xbot.common.command.BaseMaintainerCommand<Double>
xbot.common.subsystems.drive.swerve.commands.SwerveSteeringMaintainerCommand
- All Implemented Interfaces:
Sendable
,IPropertySupport
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Field Summary
Fields inherited from class xbot.common.command.BaseMaintainerCommand
decider, errorTimeStableWindowProp, errorToleranceProp, timeStableValidator
Fields inherited from class xbot.common.command.BaseCommand
aKitLog, log, monitor
-
Constructor Summary
ConstructorDescriptionSwerveSteeringMaintainerCommand
(SwerveSteeringSubsystem subsystemToMaintain, PropertyFactory pf, HumanVsMachineDecider.HumanVsMachineDeciderFactory hvmFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
The calibrated machine control action.protected void
The coast action.void
end
(boolean interrupted) protected double
protected double
Gets the human input to use for the maintain command.protected double
Gets the magnitude of the human input to use for the maintain command, since the generic type T may not be a number.void
Methods inherited from class xbot.common.command.BaseMaintainerCommand
additionalAtGoalChecks, execute, getErrorWithinTolerance, humanControlAction, initializeMachineControlAction, isMaintainerAtGoal, maintain, resetDecider, setErrorTolerance, uncalibratedMachineControlAction
Methods inherited from class xbot.common.command.BaseCommand
getPrefix, includeOnSmartDashboard, includeOnSmartDashboard, requires, runsWhenDisabled, setRunsWhenDisabled
Methods 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, isFinished, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, schedule, setName, setSubsystem, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeout
-
Constructor Details
-
SwerveSteeringMaintainerCommand
@Inject public SwerveSteeringMaintainerCommand(SwerveSteeringSubsystem subsystemToMaintain, PropertyFactory pf, HumanVsMachineDecider.HumanVsMachineDeciderFactory hvmFactory)
-
-
Method Details
-
coastAction
protected void coastAction()Description copied from class:BaseMaintainerCommand
The coast action. Typically, this does nothing.- Specified by:
coastAction
in classBaseMaintainerCommand<Double>
-
calibratedMachineControlAction
protected void calibratedMachineControlAction()Description copied from class:BaseMaintainerCommand
The calibrated machine control action.- Specified by:
calibratedMachineControlAction
in classBaseMaintainerCommand<Double>
-
getErrorMagnitude
protected double getErrorMagnitude()- Specified by:
getErrorMagnitude
in classBaseMaintainerCommand<Double>
-
getHumanInput
protected double getHumanInput()Description copied from class:BaseMaintainerCommand
Gets the human input to use for the maintain command.- Specified by:
getHumanInput
in classBaseMaintainerCommand<Double>
- Returns:
- The human input.
-
getHumanInputMagnitude
protected double getHumanInputMagnitude()Description copied from class:BaseMaintainerCommand
Gets the magnitude of the human input to use for the maintain command, since the generic type T may not be a number.- Specified by:
getHumanInputMagnitude
in classBaseMaintainerCommand<Double>
- Returns:
- The magnitude of the human input.
-
initialize
public void initialize()- Specified by:
initialize
in classBaseCommand
-
end
public void end(boolean interrupted)
-