IndexedTable

Multipurpose index-based table with increment and decrement functionality. Exposed as a runnable component for telemetry updates.

Author

Lucas Bubner, 2024

Since

1.0.0-pre

Constructors

Link copied to clipboard
constructor(@NonNull tableValues: Array<Double>)
Create a new IndexedTable.

Inherited properties

Link copied to clipboard
Get a reference to the currently running BunyipsOpMode.

Functions

Link copied to clipboard
open fun decrement()
Decrement the table index.
Link copied to clipboard
open fun get(): Double
Get the applied value from the index.
Link copied to clipboard
open fun increment()
Increment the table index.
Link copied to clipboard
open fun run()
Optionally updates telemetry with the current value and index.
Link copied to clipboard
open fun set(index: Int)
Set the table index.
Link copied to clipboard
open fun withDefaultIndex(defaultIndex: Int): IndexedTable
Set the default index of the indexed table.
Link copied to clipboard
Set the name of the indexed table.

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.