Package xbot.common.properties


package xbot.common.properties
Tunable configuration values backed by WPILib Tunables.

In general, any tunable on the robot is for one specific purpose: configuration. These values are written infrequently, but often read constantly. Typical use cases would be for PID constants, subsystem limits, thresholds, durations, and similar scenarios.

Important tunables load and save values through WPILib Preferences, while WPILib Tunables provides the editable dashboard surface under /Tunables.

Tunable values are also recorded through AdvantageKit. Mostly this is just duplication, however, this automatic logging also lets the robot perform an accurate "replay mode" if any configuration values were changed at runtime.

Tunables can be created with Important or Debug levels. Important tunables are persisted to robot storage; Debug tunables are kept in memory and published only while the global debug toggle is enabled.

For read-only telemetry, use AdvantageKit's logger rather than a tunable, as in the following example:

org.littletonrobotics.junction.Logger.recordOutput("DriveSubsystem/MaximumForwardSpeed", maxForwardSpeed);
or, for most commands/subsystems,
org.littletonrobotics.junction.Logger.recordOutput(this.getPrefix() + "/MaximumForwardSpeed", maxForwardSpeed);