Package xbot.common.properties
In general, any property 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.
Properties load their values from a file on the robot (managed by WPI's Preferences system), and simultaneously publish those values to the SmartDashboard in the "Preferences" table. Here, they can be modified by drivers/programmers at runtime, and changes are immediately reflected in the robot's behavior.
The value of the properties in every robot "tick" is also persisted to 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.
Properties can be created with Important or Debug levels. Important properties are persisted to robot storage; Debug properties are kept entirely in memory, meaning they effectively "load from default" every time the robot boots.
This package used to have a separate Ephemeral property; that's been deprecated. If you want to publish an interesting value to the human operators (as well as log it to disc), use AdvantageKit's logger, 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);
-
ClassDescriptionA property holding a boolean value.This manages a double in the property system.This interface defines a simple table interface, where you can set and retrieve values.This saves properties to the robot using WPI's built-in Preferences library.There are many values on the robot that we want to configure on the fly as well as persist once we're happy with the result.Enum to determine property persistence Ephemeral properties will not be saved or loaded from a persistent storage.A factory for creating properties.A type of Property that manages a String value.A simple implementation of ITableProxy.The PropertyManager keeps track of all properties in CoreCode.