Package com.pathplanner.lib.events
Class OneShotTriggerEvent
java.lang.Object
com.pathplanner.lib.events.Event
com.pathplanner.lib.events.OneShotTriggerEvent
Event that will activate a trigger, then deactivate it the next loop
-
Constructor Summary
ConstructorsConstructorDescriptionOneShotTriggerEvent(double timestamp, String name) Create an event for activating a trigger, then deactivating it the next loopOneShotTriggerEvent(Time timestamp, String name) Create an event for activating a trigger, then deactivating it the next loop -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelEvent(EventScheduler eventScheduler) Cancel this event.copyWithTimestamp(double timestampSeconds) Copy this event with a different timestampGet the event name for this eventvoidhandleEvent(EventScheduler eventScheduler) Handle this eventMethods inherited from class com.pathplanner.lib.events.Event
copyWithTimestamp, getTimestamp, getTimestampSeconds, setTimestamp, setTimestamp
-
Constructor Details
-
OneShotTriggerEvent
Create an event for activating a trigger, then deactivating it the next loop- Parameters:
timestamp- The trajectory timestamp of this eventname- The name of the trigger to control
-
OneShotTriggerEvent
Create an event for activating a trigger, then deactivating it the next loop- Parameters:
timestamp- The trajectory timestamp of this eventname- The name of the trigger to control
-
-
Method Details
-
getEventName
Get the event name for this event- Returns:
- The event name
-
handleEvent
Description copied from class:EventHandle this event- Specified by:
handleEventin classEvent- Parameters:
eventScheduler- Reference to the EventScheduler handling this event
-
cancelEvent
Description copied from class:EventCancel this event. This will be called if a path following command ends before this event gets handled.- Specified by:
cancelEventin classEvent- Parameters:
eventScheduler- Reference to the EventScheduler handling this event
-
copyWithTimestamp
Description copied from class:EventCopy this event with a different timestamp- Specified by:
copyWithTimestampin classEvent- Parameters:
timestampSeconds- The new timestamp- Returns:
- Copied event with new time
-