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

    Constructors
    Constructor
    Description
    RumbleCommand(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

    Modifier and Type
    Method
    Description
    void
    end(boolean interrupted)
     
    void
     
    boolean
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      execute in class edu.wpi.first.wpilibj2.command.Command
    • end

      public void end(boolean interrupted)
      Overrides:
      end in class edu.wpi.first.wpilibj2.command.Command
    • runsWhenDisabled

      public boolean runsWhenDisabled()
      Overrides:
      runsWhenDisabled in class edu.wpi.first.wpilibj2.command.Command