Class LoggedRobot

All Implemented Interfaces:
AutoCloseable

public class LoggedRobot extends IterativeRobotBase
LoggedRobot implements the IterativeRobotBase robot program framework.

The LoggedRobot class is intended to be subclassed by a user creating a robot program, and will call all required AdvantageKit periodic methods.

periodic() functions from the base class are called on an interval by a Notifier instance.

  • Field Details

    • defaultPeriodSecs

      public static final double defaultPeriodSecs
      Default loop period.
      See Also:
  • Constructor Details

    • LoggedRobot

      protected LoggedRobot()
      Constructor for LoggedRobot.
    • LoggedRobot

      protected LoggedRobot(double period)
      Constructor for LoggedRobot.
      Parameters:
      period - Period in seconds.
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class RobotBase
    • startCompetition

      public void startCompetition()
      Provide an alternate "main loop" via startCompetition().
      Specified by:
      startCompetition in class IterativeRobotBase
    • endCompetition

      public void endCompetition()
      Ends the main loop in startCompetition().
      Specified by:
      endCompetition in class RobotBase
    • setUseTiming

      public void setUseTiming(boolean useTiming)
      Sets whether to use standard timing or run as fast as possible.
      Parameters:
      useTiming - If true, use standard timing. If false, run as fast as possible.