File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
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 enters disabled mode.
6464 """
6565
6666 def execute (self ) -> None :
Original file line number Diff line number Diff line change @@ -413,8 +413,6 @@ def autonomous(self) -> None:
413413 watchdog = self .watchdog ,
414414 )
415415
416- self ._on_mode_disable_components ()
417-
418416 def _disabled (self ) -> None :
419417 """
420418 This function is called in disabled mode. You should not
@@ -513,8 +511,6 @@ def _operatorControl(self) -> None:
513511 delay .wait ()
514512 watchdog .reset ()
515513
516- self ._on_mode_disable_components ()
517-
518514 def _test (self ) -> None :
519515 """Called when the robot is in test mode"""
520516 watchdog = self .watchdog
@@ -526,6 +522,9 @@ def _test(self) -> None:
526522 wpilib .LiveWindow .setEnabled (True )
527523 # Shuffleboard.enableActuatorWidgets()
528524
525+ # initialize things
526+ self ._on_mode_enable_components ()
527+
529528 try :
530529 self .testInit ()
531530 except :
You can’t perform that action at this time.
0 commit comments