Interface Check

All Known Implementing Classes:
AutoStartCheck, BatteryCheck, CameraHeadingCheck, DeviceHealthCheck, HomingCheck, ImuMountCheck, SettingsCheck

public interface Check
One pre-match self-check, registered with PreMatchChecks.

Both methods run on the main thread after this loop's inputs are read, and must read only logged inputs (or values derived from them), so a replayed match gives the same verdicts. Neither may block, command a device or stop the robot from enabling: a check only reports.

  • Method Summary

    Modifier and Type
    Method
    Description
    evaluate(double nowSeconds)
    Judges the robot now.
    default void
    observe(double nowSeconds)
    Called every loop, enabled or not, for checks that must see every loop: a reset flag that is true for one loop, or a condition that has to hold for some time.
  • Method Details

    • observe

      default void observe(double nowSeconds)
      Called every loop, enabled or not, for checks that must see every loop: a reset flag that is true for one loop, or a condition that has to hold for some time. Keep it cheap.
      Parameters:
      nowSeconds - this loop's robot time
    • evaluate

      CheckResult evaluate(double nowSeconds)
      Judges the robot now. Called only while disabled, and not every loop: PreMatchChecks spreads the checks across loops.
      Parameters:
      nowSeconds - this loop's robot time
      Returns:
      the verdict