Skip to content

Commit aa4a032

Browse files
committed
Remove LiveWindow call from CommandBasedRobot
LiveWindow is automatically updated regardless of mode as part of 2018 WPILib IterativeRobot changes, so calling LiveWindow.run() manually is unnecessary.
1 parent 6a34403 commit aa4a032

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

commandbased/commandbasedrobot.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import hal
2-
3-
from wpilib.timedrobot import TimedRobot
4-
from wpilib.command.scheduler import Scheduler
5-
from wpilib.livewindow import LiveWindow
1+
from wpilib import TimedRobot
2+
from wpilib.command import Scheduler
63

74

85
class CommandBasedRobot(TimedRobot):
@@ -17,7 +14,6 @@ def startCompetition(self):
1714
self.scheduler = Scheduler.getInstance()
1815
super().startCompetition()
1916

20-
2117
def commandPeriodic(self):
2218
'''
2319
Run the scheduler regularly. If an error occurs during a competition,
@@ -35,20 +31,10 @@ def commandPeriodic(self):
3531

3632
self.handleCrash(error)
3733

38-
3934
autonomousPeriodic = commandPeriodic
4035
teleopPeriodic = commandPeriodic
4136
disabledPeriodic = commandPeriodic
42-
43-
44-
def testPeriodic(self):
45-
'''
46-
Test mode will not run normal commands, but motors can be controlled
47-
and sensors viewed with the SmartDashboard.
48-
'''
49-
50-
LiveWindow.run()
51-
37+
# testPeriodic deliberately omitted
5238

5339
def handleCrash(self, error):
5440
'''

0 commit comments

Comments
 (0)