mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Remove most 2022 deprecations (#4205)
Excludes "old" commands and SimDevice functions.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user