Skip to main content

Logger Standards

Recording Outputs

Any values that need to be published over NetworkTables for viewing on Shuffleboard or other WPIlib tools, should be published through the AdvantageKit Logger.

Formatting

The keys for each recorded output should be:

  • Descriptive
  • Gramatically correct
  • Uppercase

Each recorded output has a subsystem associated with it. NetworkTables differentiates values into sections with a /. For each output, before the name of the output's key, goes the subsystem name.

Example:

Logger.recordOutput("Intake/Has Game Piece", sensor.get());

Tunable Numbers

Tunable numbers are the way that 190 tunes constants without having to re-deploy code. Because tunable numbers are just tunable constants, they should be located in their respective subsystem's constants file. Tunable numbers follow the same formatting guidelines as recorded outputs:

Example:

public static final LoggedTunableNumber A_TUNABLE_CONSTANT = new LoggedTunableNumber("Subsystem/A Tunable Constant", 0.0);

Tunable numbers can be tuned over NetworkTables when the TUNING_MODE variable in Constants.java is set to true.