mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpilibj] Rename DriverStation In[Mode] functions to follow style guide (#3488)
This commit is contained in:
@@ -1104,8 +1104,7 @@ public class DriverStation {
|
||||
*
|
||||
* @param entering If true, starting disabled code; if false, leaving disabled code
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static void InDisabled(boolean entering) {
|
||||
public static void inDisabled(boolean entering) {
|
||||
m_userInDisabled = entering;
|
||||
}
|
||||
|
||||
@@ -1115,8 +1114,7 @@ public class DriverStation {
|
||||
*
|
||||
* @param entering If true, starting autonomous code; if false, leaving autonomous code
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static void InAutonomous(boolean entering) {
|
||||
public static void inAutonomous(boolean entering) {
|
||||
m_userInAutonomous = entering;
|
||||
}
|
||||
|
||||
@@ -1126,8 +1124,7 @@ public class DriverStation {
|
||||
*
|
||||
* @param entering If true, starting teleop code; if false, leaving teleop code
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static void InOperatorControl(boolean entering) {
|
||||
public static void inOperatorControl(boolean entering) {
|
||||
m_userInTeleop = entering;
|
||||
}
|
||||
|
||||
@@ -1137,8 +1134,7 @@ public class DriverStation {
|
||||
*
|
||||
* @param entering If true, starting test code; if false, leaving test code
|
||||
*/
|
||||
@SuppressWarnings("MethodName")
|
||||
public static void InTest(boolean entering) {
|
||||
public static void inTest(boolean entering) {
|
||||
m_userInTest = entering;
|
||||
}
|
||||
|
||||
|
||||
@@ -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