Scheduler
Scheduler and command plexus for use with the BunyipsLib task system in TeleOp.
Author
Lucas Bubner, 2024
Since
1.0.0-pre
See also
Types
Inherited properties
Get a reference to the currently running BunyipsOpMode.
Functions
Add subsystems to the scheduler. This will ensure the update() method of the subsystems is called, and that commands can be scheduled on these subsystems. This is REQUIRED to be called if using a base implementation of Scheduler. If you are using a CommandBasedBunyipsOpMode, see the use()
method or rely on the automatic features during construction that will add subsystems at construction with no need to call this method.
Run a task always. This is the same as calling .when(() -> true)
.
Create a new controller button trigger creator for the driver.
Get all allocated tasks.
Create a new controller button trigger creator.
Run a task when a condition is met. This condition will be evaluated continuously.
Create a new controller button trigger creator for the operator.
Run the scheduler. This will run all subsystems and tasks allocated to the scheduler. This should be called in the activeLoop()
method of the BunyipsOpMode, and is automatically called in CommandBasedBunyipsOpMode.
Create a new controller button trigger creator.
Run a task when a condition is met. This condition will be evaluated continuously.
Run a task when a condition is met. This condition will be evaluated according to a falling-edge detection.
Run a task when a condition is met. This condition will be evaluated according to a rising-edge detection.
Inherited functions
Null check consumer for the opMode field which will no-op the given consumer if an active BunyipsOpMode is not present (i.e. the opMode field is null). This method is the same to the BunyipsOpMode.ifRunning
method, and is supplied here for convenience.
Null assertion for the opMode field which throws a NullPointerException if an active BunyipsOpMode is not present (i.e. the supplied field is null). This method replicates Objects.requireNonNull
but has a built-in message to alert the user of a non-active OpMode.