Scheduler

object Scheduler

Command-based paradigm scheduler and task plexus for BunyipsLib in TeleOp. This is a singleton used to schedule and run tasks.

Designed to mirror the WPILib command scheduler. Implementations must call update periodically.

It is recommended to use the following static imports with the Scheduler:

import static au.edu.sa.mbhs.studentrobotics.bunyipslib.Scheduler.*;
import static au.edu.sa.mbhs.studentrobotics.bunyipslib.transforms.Controls.*;
import static au.edu.sa.mbhs.studentrobotics.bunyipslib.transforms.Controls.Analog.*;
import static au.edu.sa.mbhs.studentrobotics.bunyipslib.tasks.bases.Task.*;

Author

Lucas Bubner, 2025

Since

8.0.0

Types

Link copied to clipboard
class GamepadTrigger(user: GamepadUser, val instance: Gamepad)

Button or axis binding creator.

Link copied to clipboard
class ScheduledTask(val task: Task, val trigger: Scheduler.Trigger, val binding: BiConsumer<Boolean, Boolean>)

A bound task that will schedule on the given binding, accepting the previous state of the trigger and current state of the trigger.

Link copied to clipboard

A condition that will link to and execute some Task.

Properties

Link copied to clipboard

Tasks currently being executed by the Scheduler.

Link copied to clipboard

Subsystems managed by the Scheduler.

Functions

Link copied to clipboard

Disables ability to call update.

Link copied to clipboard

Resumes ability to call update.

Link copied to clipboard

Calls finish on and clears all current activeTasks.

Link copied to clipboard

Creates a button or axis trigger binder to create a Trigger for gamepad1.

Link copied to clipboard

Creates a button or axis trigger binder to create a Trigger for gamepad2.

Link copied to clipboard

Mutes Scheduler telemetry.

Link copied to clipboard

Creates a Trigger for the boolean condition.

Link copied to clipboard

Independently schedules a task to execute.

Link copied to clipboard

Unbinds a scheduled task by the id.

Link copied to clipboard

Unmutes Scheduler telemetry.

Link copied to clipboard

Updates subsystems, runs bindings, and schedules and executes tasks.

Link copied to clipboard
fun use(vararg subsystems: BunyipsSubsystem)

Use a specific subset of subsystems for the Scheduler.