Package com.thegongoliers.commands
Class VibrateXboxController
- java.lang.Object
-
- edu.wpi.first.wpilibj.command.Command
-
- com.thegongoliers.commands.VibrateXboxController
-
- All Implemented Interfaces:
edu.wpi.first.wpilibj.Sendable
,java.lang.AutoCloseable
public class VibrateXboxController extends edu.wpi.first.wpilibj.command.Command
A command to vibrate an Xbox controller.
-
-
Constructor Summary
Constructors Constructor Description VibrateXboxController(edu.wpi.first.wpilibj.XboxController controller, edu.wpi.first.wpilibj.GenericHID.RumbleType rumbleType, double intensity, double time)
Creates a command to vibrate an Xbox controller.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
end()
protected void
execute()
protected boolean
isFinished()
-
Methods inherited from class edu.wpi.first.wpilibj.command.Command
cancel, clearRequirements, close, doesRequire, getGroup, getName, getSubsystem, initialize, initSendable, interrupted, isCanceled, isCompleted, isInterruptible, isRunning, isTimedOut, requires, setInterruptible, setName, setRunWhenDisabled, setSubsystem, setTimeout, start, timeSinceInitialized, toString, willRunWhenDisabled
-
-
-
-
Constructor Detail
-
VibrateXboxController
public VibrateXboxController(edu.wpi.first.wpilibj.XboxController controller, edu.wpi.first.wpilibj.GenericHID.RumbleType rumbleType, double intensity, double time)
Creates a command to vibrate an Xbox controller.- Parameters:
controller
- The Xbox controller to vibrate.rumbleType
- The side to vibrate.intensity
- The intensity of the vibration (0 to 1).time
- The time in seconds to vibrate.
-
-
Method Detail
-
execute
protected void execute()
- Overrides:
execute
in classedu.wpi.first.wpilibj.command.Command
-
isFinished
protected boolean isFinished()
- Specified by:
isFinished
in classedu.wpi.first.wpilibj.command.Command
-
end
protected void end()
- Overrides:
end
in classedu.wpi.first.wpilibj.command.Command
-
-