Debug Mode
A collection of BunyipsOpMode debug features intended for use in a testing environment, including a controller-based kill switch, robot pickup detection, and customisable auto-halt conditions.
Author
Lucas Bubner, 2024
Since
4.1.0
Types
Link copied to clipboard
enum TriggerAction
Actions that can be executed on the event of a halting condition.
Properties
Link copied to clipboard
The threshold at which whenRobotRolled will trigger for the pitch and roll angles.
Inherited properties
Link copied to clipboard
Get a reference to the currently running BunyipsOpMode.
Functions
Link copied to clipboard
Clear the current action.
Link copied to clipboard
Get the added watchdogs via whenWatchdogExpires.
Link copied to clipboard
open fun trigger(@NonNull action: DebugMode.TriggerAction, @NonNull stopCondition: BooleanSupplier): DebugMode
Add a custom actionable condition.
Link copied to clipboard
Utility to use a "killbind" where pressing the
START
and BACK
buttons simultaneously on either gamepad runs the action.Link copied to clipboard
Utility to use the IMU to detect roll or pitch beyond ROBOT_PITCH_ROLL_THRESHOLD_DEGREES.
Link copied to clipboard
open fun whenWatchdogExpires(@NonNull timeout: Measure<Time>, @NonNull action: DebugMode.TriggerAction): DebugMode
Create a new watchdog that can be updated via index through getWatchdogs.
Inherited functions
Link copied to clipboard
Null check consumer for the opMode field which will no-op the given consumer if an active BunyipsOpMode is not present (i.e.
Link copied to clipboard
Null assertion for the opMode field which throws a NullPointerException if an active BunyipsOpMode is not present (i.e.