Class SettingsCheck

java.lang.Object
frc.spectrumLib.checks.SettingsCheck
All Implemented Interfaces:
Check

public final class SettingsCheck extends Object implements Check
Flags settings that are not at their defaults: a field layout other than the season's, a practice profile left on, a dashboard switch flipped in the pits. Each may be on purpose; the check makes sure someone meant it.
  • Constructor Details

    • SettingsCheck

      public SettingsCheck()
  • Method Details

    • add

      public SettingsCheck add(Supplier<String> changed, CheckResult.Status status)
      Adds a setting.
      Parameters:
      changed - what is not at its default, as a short phrase (e.g. "Orin practice profile ON"), or null when it is at its default
      status - how bad a change is
    • info

      public SettingsCheck info(Supplier<String> info)
      Sets a line shown when everything is at its default, e.g. which field layout is loaded.
      Parameters:
      info - the line
    • evaluate

      public CheckResult evaluate(double now)
      Description copied from interface: Check
      Judges the robot now. Called only while disabled, and not every loop: PreMatchChecks spreads the checks across loops.
      Specified by:
      evaluate in interface Check
      Parameters:
      now - this loop's robot time
      Returns:
      the verdict