mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +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:
@@ -69,6 +69,6 @@ class MyRobot(commands2.TimedCommandRobot):
|
||||
def teleopPeriodic(self) -> None:
|
||||
"""This function is called periodically during operator control"""
|
||||
|
||||
def testInit(self) -> None:
|
||||
# Cancels all running commands at the start of test mode
|
||||
def utilityInit(self) -> None:
|
||||
# Cancels all running commands at the start of utility mode
|
||||
commands2.CommandScheduler.getInstance().cancelAll()
|
||||
|
||||
@@ -49,8 +49,8 @@ class MyRobot(wpilib.TimedRobot):
|
||||
-self.controller.getLeftY(), -self.controller.getRightX()
|
||||
)
|
||||
|
||||
def testInit(self):
|
||||
"""This function is called once each time the robot enters test mode."""
|
||||
def utilityInit(self):
|
||||
"""This function is called once each time the robot enters utility mode."""
|
||||
|
||||
def testPeriodic(self):
|
||||
"""This function is called periodically during test mode."""
|
||||
def utilityPeriodic(self):
|
||||
"""This function is called periodically during utility mode."""
|
||||
|
||||
@@ -66,6 +66,6 @@ class MyRobot(commands2.TimedCommandRobot):
|
||||
def teleopPeriodic(self) -> None:
|
||||
"""This function is called periodically during operator control"""
|
||||
|
||||
def testInit(self) -> None:
|
||||
# Cancels all running commands at the start of test mode
|
||||
def utilityInit(self) -> None:
|
||||
# Cancels all running commands at the start of utility mode
|
||||
commands2.CommandScheduler.getInstance().cancelAll()
|
||||
|
||||
@@ -66,6 +66,6 @@ class MyRobot(commands2.TimedCommandRobot):
|
||||
def teleopPeriodic(self) -> None:
|
||||
"""This function is called periodically during operator control"""
|
||||
|
||||
def testInit(self) -> None:
|
||||
# Cancels all running commands at the start of test mode
|
||||
def utilityInit(self) -> None:
|
||||
# Cancels all running commands at the start of utility mode
|
||||
commands2.CommandScheduler.getInstance().cancelAll()
|
||||
|
||||
@@ -61,10 +61,10 @@ class MyRobot(commands2.TimedCommandRobot):
|
||||
"""This function is called periodically during operator control."""
|
||||
pass
|
||||
|
||||
def testInit(self) -> None:
|
||||
# Cancels all running commands at the start of test mode.
|
||||
def utilityInit(self) -> None:
|
||||
# Cancels all running commands at the start of utility mode.
|
||||
commands2.CommandScheduler.getInstance().cancelAll()
|
||||
|
||||
def testPeriodic(self) -> None:
|
||||
"""This function is called periodically during test mode."""
|
||||
def utilityPeriodic(self) -> None:
|
||||
"""This function is called periodically during utility mode."""
|
||||
pass
|
||||
|
||||
@@ -92,6 +92,6 @@ class MyRobot(commands2.TimedCommandRobot):
|
||||
def teleopPeriodic(self) -> None:
|
||||
"""This function is called periodically during operator control"""
|
||||
|
||||
def testInit(self) -> None:
|
||||
# Cancels all running commands at the start of test mode
|
||||
def utilityInit(self) -> None:
|
||||
# Cancels all running commands at the start of utility mode
|
||||
commands2.CommandScheduler.getInstance().cancelAll()
|
||||
|
||||
@@ -62,6 +62,6 @@ class MyRobot(commands2.TimedCommandRobot):
|
||||
"""This function is called periodically during operator control"""
|
||||
pass
|
||||
|
||||
def testInit(self) -> None:
|
||||
# Cancels all running commands at the start of test mode
|
||||
def utilityInit(self) -> None:
|
||||
# Cancels all running commands at the start of utility mode
|
||||
commands2.CommandScheduler.getInstance().cancelAll()
|
||||
|
||||
@@ -57,10 +57,10 @@ class MyRobot(TimedCommandRobot):
|
||||
"""This function is called periodically during operator control."""
|
||||
pass
|
||||
|
||||
def testInit(self) -> None:
|
||||
# Cancels all running commands at the start of test mode.
|
||||
def utilityInit(self) -> None:
|
||||
# Cancels all running commands at the start of utility mode.
|
||||
CommandScheduler.getInstance().cancelAll()
|
||||
|
||||
def testPeriodic(self) -> None:
|
||||
"""This function is called periodically during test mode."""
|
||||
def utilityPeriodic(self) -> None:
|
||||
"""This function is called periodically during utility mode."""
|
||||
pass
|
||||
|
||||
@@ -92,6 +92,6 @@ class MyRobot(commands2.TimedCommandRobot):
|
||||
def teleopPeriodic(self) -> None:
|
||||
"""This function is called periodically during operator control"""
|
||||
|
||||
def testInit(self) -> None:
|
||||
# Cancels all running commands at the start of test mode
|
||||
def utilityInit(self) -> None:
|
||||
# Cancels all running commands at the start of utility mode
|
||||
commands2.CommandScheduler.getInstance().cancelAll()
|
||||
|
||||
Reference in New Issue
Block a user