Files
allwpilib/wpilibc/src/main/native/cpp/RobotState.cpp
Thad House 89d15f061b Fix main function initialization (#1176)
I don't have a good way to ensure this always works, so this is going to be a documentation issue.
But initializeHardwareConfiguration is now reentrant, so we can just have all tests call it.
2018-07-08 15:41:31 -07:00

31 lines
1002 B
C++

/*----------------------------------------------------------------------------*/
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
#include "RobotState.h"
#include "DriverStation.h"
using namespace frc;
bool RobotState::IsDisabled() {
return DriverStation::GetInstance().IsDisabled();
}
bool RobotState::IsEnabled() {
return DriverStation::GetInstance().IsEnabled();
}
bool RobotState::IsOperatorControl() {
return DriverStation::GetInstance().IsOperatorControl();
}
bool RobotState::IsAutonomous() {
return DriverStation::GetInstance().IsAutonomous();
}
bool RobotState::IsTest() { return DriverStation::GetInstance().IsTest(); }