Package xbot.common.properties
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);
-
ClassDescriptionDedicated in-memory persistence for debug tunables.Non-persistent storage for debug tunables and tests.This class manages properties related to the power distribution system (PDP/PDH) for AdvantageKit logging.Stores important tunables in WPILib Preferences.Creates directly consumable WPILib tunables managed by
TunableManager.Controls whether a tunable is always published or only published while debug tunables are enabled.Owns persistence, publication, and AdvantageKit input logging for tunables.TunableMeasure<M extends org.wpilib.units.Measure<U>, U extends org.wpilib.units.Unit>A direct WPILib tunable that presents a unit-aware value while publishing its magnitude in the unit named in its key.Typed persistence used by managed tunables.