Remove most 2022 deprecations (#4205)

Excludes "old" commands and SimDevice functions.
This commit is contained in:
Tyler Veness
2022-05-04 20:37:27 -07:00
committed by GitHub
parent ce1a7d698a
commit ee03a7ad3b
75 changed files with 165 additions and 1882 deletions

View File

@@ -233,12 +233,6 @@ Instance::~Instance() {
}
}
DriverStation& DriverStation::GetInstance() {
::GetInstance();
static DriverStation instance;
return instance;
}
bool DriverStation::GetStickButton(int stick, int button) {
if (stick < 0 || stick >= kJoystickPorts) {
FRC_ReportError(warn::BadJoystickIndex, "stick {} out of range", stick);
@@ -504,20 +498,12 @@ bool DriverStation::IsAutonomousEnabled() {
return controlWord.autonomous && controlWord.enabled;
}
bool DriverStation::IsOperatorControl() {
return IsTeleop();
}
bool DriverStation::IsTeleop() {
HAL_ControlWord controlWord;
HAL_GetControlWord(&controlWord);
return !(controlWord.autonomous || controlWord.test);
}
bool DriverStation::IsOperatorControlEnabled() {
return IsTeleopEnabled();
}
bool DriverStation::IsTeleopEnabled() {
HAL_ControlWord controlWord;
HAL_GetControlWord(&controlWord);
@@ -671,10 +657,6 @@ void DriverStation::InAutonomous(bool entering) {
::GetInstance().userInAutonomous = entering;
}
void DriverStation::InOperatorControl(bool entering) {
InTeleop(entering);
}
void DriverStation::InTeleop(bool entering) {
::GetInstance().userInTeleop = entering;
}