File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ def setup(self) -> None:
4949
5050 def on_enable (self ) -> None :
5151 """
52- Called when the robot enters autonomous or teleoperated mode. This
52+ Called when the robot enters autonomous, teleoperated or test mode mode. This
5353 function should initialize your component to a "safe" state so
5454 that unexpected things don't happen when enabling the robot.
5555
@@ -60,7 +60,7 @@ def on_enable(self) -> None:
6060
6161 def on_disable (self ) -> None :
6262 """
63- Called when the robot leaves autonomous or teleoperated
63+ Called when the robot leaves autonomous, teleoperated or test mode
6464 """
6565
6666 def execute (self ) -> None :
Original file line number Diff line number Diff line change @@ -526,6 +526,9 @@ def _test(self) -> None:
526526 wpilib .LiveWindow .setEnabled (True )
527527 # Shuffleboard.enableActuatorWidgets()
528528
529+ # initialize things
530+ self ._on_mode_enable_components ()
531+
529532 try :
530533 self .testInit ()
531534 except :
@@ -559,6 +562,8 @@ def _test(self) -> None:
559562 wpilib .LiveWindow .setEnabled (False )
560563 # Shuffleboard.disableActuatorWidgets()
561564
565+ self ._on_mode_disable_components ()
566+
562567 def _on_mode_enable_components (self ) -> None :
563568 # initialize things
564569 for _ , component in self ._components :
You can’t perform that action at this time.
0 commit comments