001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package edu.wpi.first.wpilibj;
006
007public final class RobotState {
008  /**
009   * Returns true if the robot is disabled.
010   *
011   * @return True if the robot is disabled.
012   */
013  public static boolean isDisabled() {
014    return DriverStation.isDisabled();
015  }
016
017  /**
018   * Returns true if the robot is enabled.
019   *
020   * @return True if the robot is enabled.
021   */
022  public static boolean isEnabled() {
023    return DriverStation.isEnabled();
024  }
025
026  /**
027   * Returns true if the robot is E-stopped.
028   *
029   * @return True if the robot is E-stopped.
030   */
031  public static boolean isEStopped() {
032    return DriverStation.isEStopped();
033  }
034
035  /**
036   * Returns true if the robot is in teleop mode.
037   *
038   * @return True if the robot is in teleop mode.
039   */
040  public static boolean isTeleop() {
041    return DriverStation.isTeleop();
042  }
043
044  /**
045   * Returns true if the robot is in autonomous mode.
046   *
047   * @return True if the robot is in autonomous mode.
048   */
049  public static boolean isAutonomous() {
050    return DriverStation.isAutonomous();
051  }
052
053  /**
054   * Returns true if the robot is in test mode.
055   *
056   * @return True if the robot is in test mode.
057   */
058  public static boolean isTest() {
059    return DriverStation.isTest();
060  }
061
062  private RobotState() {}
063}