mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
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.
31 lines
1002 B
C++
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(); }
|