Package com.pathplanner.lib.events
Class EventTrigger
java.lang.Object
edu.wpi.first.wpilibj2.command.button.Trigger
com.pathplanner.lib.events.EventTrigger
- All Implemented Interfaces:
BooleanSupplier
A trigger that will be controlled by the placement of event markers/zones in a
PathPlannerTrajectory
-
Constructor Summary
ConstructorDescriptionEventTrigger
(EventLoop eventLoop, String name) Create a new EventTrigger that gets polled by the given event loop instead of the EventSchedulerEventTrigger
(String name) Create a new EventTrigger. -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
setCondition
(String name, boolean value) Set the value of an event conditionMethods inherited from class edu.wpi.first.wpilibj2.command.button.Trigger
and, debounce, debounce, getAsBoolean, negate, onChange, onFalse, onTrue, or, toggleOnFalse, toggleOnTrue, whileFalse, whileTrue
-
Constructor Details
-
EventTrigger
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
Create a new EventTrigger that gets polled by the given event loop instead of the EventScheduler- Parameters:
eventLoop
- The event loop to poll this triggername
- The name of the event. This will be the name of the event marker in the GUI
-
-
Method Details
-
setCondition
Set the value of an event condition- Parameters:
name
- The name of the conditionvalue
- The value of the condition
-