DebugMode

open class DebugMode : Runnable

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.

Must be used in a BunyipsOpMode due to internal references.

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.

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.