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:
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 enters disabled mode.
64
64
"""
65
65
66
66
def execute (self ) -> None :
Original file line number Diff line number Diff line change @@ -413,8 +413,6 @@ def autonomous(self) -> None:
413
413
watchdog = self .watchdog ,
414
414
)
415
415
416
- self ._on_mode_disable_components ()
417
-
418
416
def _disabled (self ) -> None :
419
417
"""
420
418
This function is called in disabled mode. You should not
@@ -513,8 +511,6 @@ def _operatorControl(self) -> None:
513
511
delay .wait ()
514
512
watchdog .reset ()
515
513
516
- self ._on_mode_disable_components ()
517
-
518
514
def _test (self ) -> None :
519
515
"""Called when the robot is in test mode"""
520
516
watchdog = self .watchdog
@@ -526,6 +522,9 @@ def _test(self) -> None:
526
522
wpilib .LiveWindow .setEnabled (True )
527
523
# Shuffleboard.enableActuatorWidgets()
528
524
525
+ # initialize things
526
+ self ._on_mode_enable_components ()
527
+
529
528
try :
530
529
self .testInit ()
531
530
except :
You can’t perform that action at this time.
0 commit comments