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:
49
49
50
50
def on_enable (self ) -> None :
51
51
"""
52
- Called when the robot enters autonomous or teleoperated mode. This
52
+ Called when the robot enters autonomous, teleoperated or test mode mode. This
53
53
function should initialize your component to a "safe" state so
54
54
that unexpected things don't happen when enabling the robot.
55
55
@@ -60,7 +60,7 @@ def on_enable(self) -> None:
60
60
61
61
def on_disable (self ) -> None :
62
62
"""
63
- Called when the robot leaves autonomous or teleoperated
63
+ Called when the robot leaves autonomous, teleoperated or test mode
64
64
"""
65
65
66
66
def execute (self ) -> None :
Original file line number Diff line number Diff line change @@ -526,6 +526,9 @@ def _test(self) -> None:
526
526
wpilib .LiveWindow .setEnabled (True )
527
527
# Shuffleboard.enableActuatorWidgets()
528
528
529
+ # initialize things
530
+ self ._on_mode_enable_components ()
531
+
529
532
try :
530
533
self .testInit ()
531
534
except :
@@ -559,6 +562,8 @@ def _test(self) -> None:
559
562
wpilib .LiveWindow .setEnabled (False )
560
563
# Shuffleboard.disableActuatorWidgets()
561
564
565
+ self ._on_mode_disable_components ()
566
+
562
567
def _on_mode_enable_components (self ) -> None :
563
568
# initialize things
564
569
for _ , component in self ._components :
You can’t perform that action at this time.
0 commit comments