Package com.pathplanner.lib.events
Class ScheduleCommandEvent
java.lang.Object
com.pathplanner.lib.events.Event
com.pathplanner.lib.events.ScheduleCommandEvent
Event that will schedule a command within the EventScheduler
-
Constructor Summary
ConstructorDescriptionScheduleCommandEvent
(double timestamp, Command command) Create an event to schedule a commandScheduleCommandEvent
(edu.wpi.first.units.measure.Time timestamp, Command command) Create an event to schedule a command -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancelEvent
(EventScheduler eventScheduler) Cancel this event.copyWithTimestamp
(double timestampSeconds) Copy this event with a different timestampvoid
handleEvent
(EventScheduler eventScheduler) Handle this eventMethods inherited from class com.pathplanner.lib.events.Event
copyWithTimestamp, getTimestamp, getTimestampSeconds, setTimestamp, setTimestamp
-
Constructor Details
-
ScheduleCommandEvent
Create an event to schedule a command- Parameters:
timestamp
- The trajectory timestamp for this eventcommand
- The command to schedule
-
ScheduleCommandEvent
Create an event to schedule a command- Parameters:
timestamp
- The trajectory timestamp for this eventcommand
- The command to schedule
-
-
Method Details
-
handleEvent
Description copied from class:Event
Handle this event- Specified by:
handleEvent
in classEvent
- Parameters:
eventScheduler
- Reference to the EventScheduler handling this event
-
cancelEvent
Description copied from class:Event
Cancel this event. This will be called if a path following command ends before this event gets handled.- Specified by:
cancelEvent
in classEvent
- Parameters:
eventScheduler
- Reference to the EventScheduler handling this event
-
copyWithTimestamp
Description copied from class:Event
Copy this event with a different timestamp- Specified by:
copyWithTimestamp
in classEvent
- Parameters:
timestampSeconds
- The new timestamp- Returns:
- Copied event with new time
-