mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilibj] Rename DriverStation In[Mode] functions to follow style guide (#3488)
This commit is contained in:
@@ -39,30 +39,30 @@ public class EducationalRobot extends RobotBase {
|
||||
|
||||
while (!Thread.currentThread().isInterrupted() && !m_exit) {
|
||||
if (isDisabled()) {
|
||||
DriverStation.InDisabled(true);
|
||||
DriverStation.inDisabled(true);
|
||||
disabled();
|
||||
DriverStation.InDisabled(false);
|
||||
DriverStation.inDisabled(false);
|
||||
while (isDisabled()) {
|
||||
DriverStation.waitForData();
|
||||
}
|
||||
} else if (isAutonomous()) {
|
||||
DriverStation.InAutonomous(true);
|
||||
DriverStation.inAutonomous(true);
|
||||
autonomous();
|
||||
DriverStation.InAutonomous(false);
|
||||
DriverStation.inAutonomous(false);
|
||||
while (isAutonomousEnabled()) {
|
||||
DriverStation.waitForData();
|
||||
}
|
||||
} else if (isTest()) {
|
||||
DriverStation.InTest(true);
|
||||
DriverStation.inTest(true);
|
||||
test();
|
||||
DriverStation.InTest(false);
|
||||
DriverStation.inTest(false);
|
||||
while (isTest() && isEnabled()) {
|
||||
DriverStation.waitForData();
|
||||
}
|
||||
} else {
|
||||
DriverStation.InOperatorControl(true);
|
||||
DriverStation.inOperatorControl(true);
|
||||
teleop();
|
||||
DriverStation.InOperatorControl(false);
|
||||
DriverStation.inOperatorControl(false);
|
||||
while (isOperatorControlEnabled()) {
|
||||
DriverStation.waitForData();
|
||||
}
|
||||
|
||||
@@ -36,34 +36,34 @@ public class Robot extends RobotBase {
|
||||
|
||||
while (!Thread.currentThread().isInterrupted() && !m_exit) {
|
||||
if (isDisabled()) {
|
||||
DriverStation.InDisabled(true);
|
||||
DriverStation.inDisabled(true);
|
||||
disabled();
|
||||
DriverStation.InDisabled(false);
|
||||
DriverStation.inDisabled(false);
|
||||
while (isDisabled()) {
|
||||
DriverStation.waitForData();
|
||||
}
|
||||
} else if (isAutonomous()) {
|
||||
DriverStation.InAutonomous(true);
|
||||
DriverStation.inAutonomous(true);
|
||||
autonomous();
|
||||
DriverStation.InAutonomous(false);
|
||||
DriverStation.inAutonomous(false);
|
||||
while (isAutonomousEnabled()) {
|
||||
DriverStation.waitForData();
|
||||
}
|
||||
} else if (isTest()) {
|
||||
LiveWindow.setEnabled(true);
|
||||
Shuffleboard.enableActuatorWidgets();
|
||||
DriverStation.InTest(true);
|
||||
DriverStation.inTest(true);
|
||||
test();
|
||||
DriverStation.InTest(false);
|
||||
DriverStation.inTest(false);
|
||||
while (isTest() && isEnabled()) {
|
||||
DriverStation.waitForData();
|
||||
}
|
||||
LiveWindow.setEnabled(false);
|
||||
Shuffleboard.disableActuatorWidgets();
|
||||
} else {
|
||||
DriverStation.InOperatorControl(true);
|
||||
DriverStation.inOperatorControl(true);
|
||||
teleop();
|
||||
DriverStation.InOperatorControl(false);
|
||||
DriverStation.inOperatorControl(false);
|
||||
while (isOperatorControlEnabled()) {
|
||||
DriverStation.waitForData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user