Package com.pathplanner.lib.events
Class PointTowardsZoneTrigger
java.lang.Object
edu.wpi.first.wpilibj2.command.button.Trigger
com.pathplanner.lib.events.PointTowardsZoneTrigger
- All Implemented Interfaces:
BooleanSupplier
A trigger that will be controlled by the robot entering/leaving a point towards zone
-
Constructor Summary
ConstructorDescriptionPointTowardsZoneTrigger
(EventLoop eventLoop, String name) Create a new PointTowardsZoneTrigger that gets polled by the given event loop instead of the EventSchedulerCreate a new PointTowardsZoneTrigger. -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
setWithinZone
(String name, boolean withinZone) Set the value of a zone 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
-
PointTowardsZoneTrigger
Create a new PointTowardsZoneTrigger. 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 point towards zone
-
PointTowardsZoneTrigger
Create a new PointTowardsZoneTrigger 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 point towards zone
-
-
Method Details
-
setWithinZone
Set the value of a zone condition- Parameters:
name
- The name of the conditionwithinZone
- Is the robot within the point towards zone with the given name
-