Class SwerveDriveMaintainerCommand
java.lang.Object
org.wpilib.command2.Command
xbot.common.command.BaseCommand
xbot.common.command.BaseMaintainerCommand<Double,Double>
xbot.common.command.BaseSimpleMaintainerCommand
xbot.common.subsystems.drive.swerve.commands.SwerveDriveMaintainerCommand
- All Implemented Interfaces:
AutoCloseable, org.wpilib.telemetry.TelemetryLoggable, org.wpilib.tunable.ComplexTunable, TunablePrefixProvider
-
Nested Class Summary
Nested classes/interfaces inherited from class org.wpilib.command2.Command
org.wpilib.command2.Command.InterruptionBehavior -
Field Summary
Fields inherited from class BaseMaintainerCommand
decider, errorTimeStableWindowTunable, errorToleranceTunable, timeStableValidatorFields inherited from class BaseCommand
aKitLog, log, monitor, runningAlert -
Constructor Summary
ConstructorsConstructorDescriptionSwerveDriveMaintainerCommand(BaseSwerveDriveSubsystem drive, SwerveDriveSubsystem subsystemToMaintain, TunableFactory tunableFactory, HumanVsMachineDecider.HumanVsMachineDeciderFactory hvmFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThe calibrated machine control action.protected voidThe coast action.voidend(boolean interrupted) protected doubleprotected DoubleGets the human input to use for the maintain command.protected doubleGets the magnitude of the human input to use for the maintain command, since the generic typePowerTmay not be a number.voidMethods inherited from class BaseMaintainerCommand
additionalAtGoalChecks, execute, getErrorWithinTolerance, humanControlAction, initializeMachineControlAction, isMaintainerAtGoal, maintain, resetDecider, runsWhenDisabled, setErrorTolerance, uncalibratedMachineControlActionMethods inherited from class BaseCommand
close, getPrefix, publishToTunables, publishToTunables, setRunsWhenDisabledMethods inherited from class org.wpilib.command2.Command
addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, finallyDo, finallyDo, getInterruptionBehavior, getName, getRequirements, getTelemetryType, getTunableType, handleInterrupt, hasRequirement, ignoringDisable, isFinished, isScheduled, logTo, onlyIf, onlyWhile, publishTunable, raceWith, repeatedly, setName, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeoutMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wpilib.tunable.ComplexTunable
publishChildTunable, publishChildTunable, removeChildTunable, setChildTunableChanged, updateTunable
-
Constructor Details
-
SwerveDriveMaintainerCommand
@Inject public SwerveDriveMaintainerCommand(BaseSwerveDriveSubsystem drive, SwerveDriveSubsystem subsystemToMaintain, TunableFactory tunableFactory, HumanVsMachineDecider.HumanVsMachineDeciderFactory hvmFactory)
-
-
Method Details
-
coastAction
protected void coastAction()Description copied from class:BaseMaintainerCommandThe coast action. Typically, this does nothing.- Specified by:
coastActionin classBaseMaintainerCommand<Double,Double>
-
calibratedMachineControlAction
protected void calibratedMachineControlAction()Description copied from class:BaseMaintainerCommandThe calibrated machine control action.- Specified by:
calibratedMachineControlActionin classBaseMaintainerCommand<Double,Double>
-
getErrorMagnitude
protected double getErrorMagnitude()- Specified by:
getErrorMagnitudein classBaseMaintainerCommand<Double,Double>
-
getHumanInput
Description copied from class:BaseMaintainerCommandGets the human input to use for the maintain command.- Specified by:
getHumanInputin classBaseMaintainerCommand<Double,Double> - Returns:
- The human input.
-
getHumanInputMagnitude
protected double getHumanInputMagnitude()Description copied from class:BaseMaintainerCommandGets the magnitude of the human input to use for the maintain command, since the generic typePowerTmay not be a number.- Specified by:
getHumanInputMagnitudein classBaseMaintainerCommand<Double,Double> - Returns:
- The magnitude of the human input.
-
initialize
public void initialize()- Overrides:
initializein classBaseMaintainerCommand<Double,Double>
-
end
public void end(boolean interrupted) - Overrides:
endin classBaseCommand
-