Class HapticCommand

All Implemented Interfaces:
Sendable

public class HapticCommand extends Command
Triggers controller rumble for a specified amount of time.
  • Constructor Details

    • HapticCommand

      public HapticCommand(GenericHID controller, GenericHID.RumbleType type, double strength, Time duration)
      Creates a Command that triggers controller rumble for a specified amount of time.
      Parameters:
      controller - Controller to rumble.
      type - Rumble type to set.
      strength - Rumble strength [0-1].
      duration - Rumble duration.
    • HapticCommand

      public HapticCommand(CommandGenericHID controller, GenericHID.RumbleType type, double strength, Time duration)
      Creates a Command that triggers controller rumble for a specified amount of time.
      Parameters:
      controller - Controller to rumble.
      type - Rumble type to set.
      strength - Rumble strength [0-1].
      duration - Rumble duration.
  • Method Details

    • initialize

      public void initialize()
      Overrides:
      initialize in class Command
    • end

      public void end(boolean interrupted)
      Overrides:
      end in class Command
    • isFinished

      public boolean isFinished()
      Overrides:
      isFinished in class Command
    • runsWhenDisabled

      public boolean runsWhenDisabled()
      Overrides:
      runsWhenDisabled in class Command