Package org.team1126.lib.util.command
Class RumbleCommand
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
org.team1126.lib.util.command.RumbleCommand
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
public class RumbleCommand
extends edu.wpi.first.wpilibj2.command.Command
A command that rumbles a controller while scheduled.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.Command.InterruptionBehavior -
Constructor Summary
ConstructorsConstructorDescriptionRumbleCommand(edu.wpi.first.wpilibj.GenericHID controller, double value) Creates a new rumble command.RumbleCommand(edu.wpi.first.wpilibj.GenericHID controller, edu.wpi.first.wpilibj.GenericHID.RumbleType type, double value) Creates a new rumble command.RumbleCommand(edu.wpi.first.wpilibj2.command.button.CommandGenericHID controller, double value) Creates a new rumble command.RumbleCommand(edu.wpi.first.wpilibj2.command.button.CommandGenericHID controller, edu.wpi.first.wpilibj.GenericHID.RumbleType type, double value) Creates a new rumble command. -
Method Summary
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, initialize, initSendable, isFinished, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, schedule, setName, setSubsystem, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeout
-
Constructor Details
-
RumbleCommand
public RumbleCommand(edu.wpi.first.wpilibj2.command.button.CommandGenericHID controller, double value) Creates a new rumble command.- Parameters:
controller- The controller to rumble.value- The normalized value (0 to 1) to set the rumble to.
-
RumbleCommand
public RumbleCommand(edu.wpi.first.wpilibj.GenericHID controller, double value) Creates a new rumble command.- Parameters:
controller- The controller to rumble.value- The normalized value (0 to 1) to set the rumble to.
-
RumbleCommand
public RumbleCommand(edu.wpi.first.wpilibj2.command.button.CommandGenericHID controller, edu.wpi.first.wpilibj.GenericHID.RumbleType type, double value) Creates a new rumble command.- Parameters:
controller- The controller to rumble.type- Which rumble value to set.value- The normalized value (0 to 1) to set the rumble to.
-
RumbleCommand
public RumbleCommand(edu.wpi.first.wpilibj.GenericHID controller, edu.wpi.first.wpilibj.GenericHID.RumbleType type, double value) Creates a new rumble command.- Parameters:
controller- The controller to rumble.type- Which rumble value to set.value- The normalized value (0 to 1) to set the rumble to.
-
-
Method Details
-
execute
public void execute()- Overrides:
executein classedu.wpi.first.wpilibj2.command.Command
-
end
public void end(boolean interrupted) - Overrides:
endin classedu.wpi.first.wpilibj2.command.Command
-
runsWhenDisabled
public boolean runsWhenDisabled()- Overrides:
runsWhenDisabledin classedu.wpi.first.wpilibj2.command.Command
-