DebugMode

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

Constructors

Link copied to clipboard
constructor()
Enable debug mode.

Types

Link copied to clipboard
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
open fun clearAction()
Clear the current action.
Link copied to clipboard
Construct a new instance of DebugMode.
Link copied to clipboard
open fun getWatchdogs(): Array<Watchdog>
Get the added watchdogs via whenWatchdogExpires.
Link copied to clipboard
open fun run()
Link copied to clipboard
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
Create a new watchdog that can be updated via index through getWatchdogs.

Inherited functions

Link copied to clipboard
protected fun opMode(@NonNull ifRunning: Consumer<BunyipsOpMode>)
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
protected fun require(@Nullable nullableOpMode: BunyipsOpMode): BunyipsOpMode
Null assertion for the opMode field which throws a NullPointerException if an active BunyipsOpMode is not present (i.e.