Colour Tuner Op Mode
A tuning OpMode for calibrating the vision system's colour thresholding using controller input.
Note that if you want to tune a processor using FtcDashboard, you have to use the static fields offered by ColourTuner, not the processor (as it will be overridden and controlled by the controllers)
Author
Lucas Bubner, 2024
Since
3.4.0
Properties
Inherited properties
BunyipsLib Gamepad 1: Driver
BunyipsLib Gamepad 2: Operator
Set how fast the OpMode is able to loop in the activeLoop or onInitLoop methods in Loops per Time Unit. This will dynamically adjust to be the target speed of how fast loops should be executed. Measures of less than or equal to zero will be ignored, and the OpMode will run as fast as possible.
Shorthand field alias for the telemetry (DualTelemetry) field. Sometimes, this field is required to be used as the Kotlin compiler might have trouble distinguishing between the overridden field and the base field. This method is a direct alias to the DualTelemetry field.
BunyipsLib Driver Station & FtcDashboard Telemetry
The moving average timer for the OpMode, which is used to calculate time between hardware cycles. This is useful for debugging, performance monitoring, and calculating various time-based values (deltaTime, loopCount, elapsedTime, etc.)
Functions
Inherited functions
Removes a Runnable that was added to the active loop via onActiveLoop. Calling this method will no-op on runnables that can't be found on the currently attached runnables, and will stop executing runnables on the active loop that could be found.
Dangerous method: call to IMMEDIATELY terminate the OpMode. No further code will run, and this should only be used in emergencies.
Dangerous method: call to shut down the OpMode as soon as possible. This will run any BunyipsOpMode cleanup code, much as if the user pressed the STOP
button.
BunyipsLib Gamepad 1: Driver
BunyipsLib Gamepad 2: Operator
Get the currently respected init-task that will run during dynamic_init
.
The instance of the current BunyipsOpMode. This is set automatically by the BunyipsOpMode lifecycle. This can be used instead of dependency injection to access the current OpMode, as it is a singleton.
A list of all LynxModules (Control + Expansion Hub) modules on the robot.
Shorthand field alias for the telemetry (DualTelemetry) field. Sometimes, this field is required to be used as the Kotlin compiler might have trouble distinguishing between the overridden field and the base field. This method is a direct alias to the DualTelemetry field.
BunyipsLib Driver Station & FtcDashboard Telemetry
The moving average timer for the OpMode, which is used to calculate time between hardware cycles. This is useful for debugging, performance monitoring, and calculating various time-based values (deltaTime, loopCount, elapsedTime, etc.)
Call to temporarily halt all activeLoop-related updates from running. Note this will pause the entire activeLoop, but continue to update timers and telemetry. These events must be handled manually if needed, which include any conditional calls to resume.
Run the supplied callback if a BunyipsOpMode is currently running. This chains an internal call to BunyipsOpMode with a lambda supplied with the non-null instance of BunyipsOpMode.
Whether a BunyipsOpMode is currently running. This is useful for checking if the OpMode singleton can be accessed without raising an exception due to the field being null.
Add a Runnable to the list of runnables to be executed just before the activeLoop. This is useful for running code that needs to be executed on the main thread, but is not a subsystem or task.
Perform one time clean-up operations after the activeLoop finishes all intentions gracefully.
Allow code to execute once after all initialisation has finished.
Run code in a loop AFTER onInit has completed, until start is pressed on the Driver Station and the init-task (setInitTask) is done. The boolean returned by this method will indicate the status of the imit-loop, if it returns true, the init-loop will finish early.
Call to resume the activeLoop after a halt call.
This method is the entry point for the BunyipsLib framework, and is called by the FTC SDK.
Dangerous method: Call to command all motors and servos on the robot to shut down. This is a method called by the SDK continuously when no OpMode is running. It is also automatically called via finish.
BunyipsLib Gamepad 1: Driver
BunyipsLib Gamepad 2: Operator
Set a task that will run as an init-task. This will run after your onInit has completed, allowing you to initialise hardware first. This is an optional method, and runs alongside onInitLoop.
Shorthand field alias for the telemetry (DualTelemetry) field. Sometimes, this field is required to be used as the Kotlin compiler might have trouble distinguishing between the overridden field and the base field. This method is a direct alias to the DualTelemetry field.
BunyipsLib Driver Station & FtcDashboard Telemetry
The moving average timer for the OpMode, which is used to calculate time between hardware cycles. This is useful for debugging, performance monitoring, and calculating various time-based values (deltaTime, loopCount, elapsedTime, etc.)
Call to command all moving motors/CRServos to stop by method of setting their powers to zero. This does not impact normal servos.