Class PointTowardsZoneEvent

java.lang.Object
com.pathplanner.lib.events.Event
com.pathplanner.lib.events.PointTowardsZoneEvent

public class PointTowardsZoneEvent extends Event
Event for setting the value of a point towards zone trigger
  • Constructor Details

    • PointTowardsZoneEvent

      public PointTowardsZoneEvent(double timestamp, String name, boolean active)
      Create an event for changing the value of a point towards zone trigger
      Parameters:
      timestamp - The trajectory timestamp of this event
      name - The name of the point towards zone trigger to control
      active - Should the trigger be activated by this event
    • PointTowardsZoneEvent

      public PointTowardsZoneEvent(edu.wpi.first.units.measure.Time timestamp, String name, boolean active)
      Create an event for changing the value of a point towards zone trigger
      Parameters:
      timestamp - The trajectory timestamp of this event
      name - The name of the point towards zone trigger to control
      active - Should the trigger be activated by this event
  • Method Details

    • handleEvent

      public void handleEvent(EventScheduler eventScheduler)
      Handle this event
      Specified by:
      handleEvent in class Event
      Parameters:
      eventScheduler - Reference to the EventScheduler running this event
    • cancelEvent

      public void cancelEvent(EventScheduler eventScheduler)
      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 class Event
      Parameters:
      eventScheduler - Reference to the EventScheduler handling this event
    • copyWithTimestamp

      public Event copyWithTimestamp(double timestampSeconds)
      Description copied from class: Event
      Copy this event with a different timestamp
      Specified by:
      copyWithTimestamp in class Event
      Parameters:
      timestampSeconds - The new timestamp
      Returns:
      Copied event with new time