mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
[hal,wpilib] Rename "Test" robot mode to "Utility" (#8782)
The "Utility" name better matches its intended generic use case and avoids overloaded terminology with unit testing (e.g. the need to name the opmode annotation `@TestOpMode`). The driver station will also be updated to reflect this change.
This commit is contained in:
@@ -91,23 +91,23 @@ public final class RobotState {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a value indicating whether the Driver Station requires the robot to be running in Test
|
||||
* Gets a value indicating whether the Driver Station requires the robot to be running in Utility
|
||||
* mode.
|
||||
*
|
||||
* @return True if test mode should be enabled, false otherwise.
|
||||
* @return True if utility mode should be enabled, false otherwise.
|
||||
*/
|
||||
public static boolean isTest() {
|
||||
return DriverStationBackend.isTest();
|
||||
public static boolean isUtility() {
|
||||
return DriverStationBackend.isUtility();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a value indicating whether the Driver Station requires the robot to be running in Test
|
||||
* Gets a value indicating whether the Driver Station requires the robot to be running in Utility
|
||||
* mode and enabled.
|
||||
*
|
||||
* @return True if test mode should be set and the robot should be enabled.
|
||||
* @return True if utility mode should be set and the robot should be enabled.
|
||||
*/
|
||||
public static boolean isTestEnabled() {
|
||||
return DriverStationBackend.isTestEnabled();
|
||||
public static boolean isUtilityEnabled() {
|
||||
return DriverStationBackend.isUtilityEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1167,30 +1167,30 @@ public final class DriverStationBackend {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a value indicating whether the Driver Station requires the robot to be running in Test
|
||||
* Gets a value indicating whether the Driver Station requires the robot to be running in Utility
|
||||
* mode.
|
||||
*
|
||||
* @return True if test mode should be enabled, false otherwise.
|
||||
* @return True if utility mode should be enabled, false otherwise.
|
||||
*/
|
||||
public static boolean isTest() {
|
||||
public static boolean isUtility() {
|
||||
m_cacheDataMutex.lock();
|
||||
try {
|
||||
return m_controlWord.isTest();
|
||||
return m_controlWord.isUtility();
|
||||
} finally {
|
||||
m_cacheDataMutex.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a value indicating whether the Driver Station requires the robot to be running in Test
|
||||
* Gets a value indicating whether the Driver Station requires the robot to be running in Utility
|
||||
* mode and enabled.
|
||||
*
|
||||
* @return True if test mode should be set and the robot should be enabled.
|
||||
* @return True if utility mode should be set and the robot should be enabled.
|
||||
*/
|
||||
public static boolean isTestEnabled() {
|
||||
public static boolean isUtilityEnabled() {
|
||||
m_cacheDataMutex.lock();
|
||||
try {
|
||||
return m_controlWord.isTestEnabled();
|
||||
return m_controlWord.isUtilityEnabled();
|
||||
} finally {
|
||||
m_cacheDataMutex.unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user