blob: 651a6445fee7cf451270aa839e51f99e45831e69 [file] [log] [blame]
Austin Schuh812d0d12021-11-04 20:16:48 -07001// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
Brian Silverman8fce7482020-01-05 13:18:21 -08004
5#include "frc/RobotState.h"
6
7#include "frc/DriverStation.h"
8
9using namespace frc;
10
11bool RobotState::IsDisabled() {
Austin Schuh812d0d12021-11-04 20:16:48 -070012 return DriverStation::IsDisabled();
Brian Silverman8fce7482020-01-05 13:18:21 -080013}
14
15bool RobotState::IsEnabled() {
Austin Schuh812d0d12021-11-04 20:16:48 -070016 return DriverStation::IsEnabled();
Brian Silverman8fce7482020-01-05 13:18:21 -080017}
18
19bool RobotState::IsEStopped() {
Austin Schuh812d0d12021-11-04 20:16:48 -070020 return DriverStation::IsEStopped();
Brian Silverman8fce7482020-01-05 13:18:21 -080021}
22
23bool RobotState::IsOperatorControl() {
Austin Schuh812d0d12021-11-04 20:16:48 -070024 return IsTeleop();
25}
26
27bool RobotState::IsTeleop() {
28 return DriverStation::IsTeleop();
Brian Silverman8fce7482020-01-05 13:18:21 -080029}
30
31bool RobotState::IsAutonomous() {
Austin Schuh812d0d12021-11-04 20:16:48 -070032 return DriverStation::IsAutonomous();
Brian Silverman8fce7482020-01-05 13:18:21 -080033}
34
Austin Schuh812d0d12021-11-04 20:16:48 -070035bool RobotState::IsTest() {
36 return DriverStation::IsTest();
37}