Class EventTrigger

java.lang.Object
edu.wpi.first.wpilibj2.command.button.Trigger
com.pathplanner.lib.events.EventTrigger
All Implemented Interfaces:
BooleanSupplier

public class EventTrigger extends Trigger
A trigger that will be controlled by the placement of event markers/zones in a PathPlannerTrajectory
  • Constructor Details

    • EventTrigger

      public EventTrigger(String name)
      Create a new EventTrigger. This will run on the EventScheduler's event loop, which will be polled any time a path following command is running.
      Parameters:
      name - The name of the event. This will be the name of the event marker in the GUI
    • EventTrigger

      public EventTrigger(EventLoop eventLoop, String name)
      Create a new EventTrigger that gets polled by the given event loop instead of the EventScheduler
      Parameters:
      eventLoop - The event loop to poll this trigger
      name - The name of the event. This will be the name of the event marker in the GUI
  • Method Details

    • setCondition

      protected static void setCondition(String name, boolean value)
      Set the value of an event condition
      Parameters:
      name - The name of the condition
      value - The value of the condition