mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilib] Split DriverStation into smaller classes (#8628)
This commit is contained in:
@@ -9,7 +9,7 @@ from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Union
|
||||
import hal
|
||||
from typing_extensions import Self
|
||||
from wpilib import (
|
||||
DriverStation,
|
||||
RobotState,
|
||||
EventLoop,
|
||||
RobotBase,
|
||||
TimedRobot,
|
||||
@@ -192,7 +192,7 @@ class CommandScheduler(Sendable):
|
||||
if self.isScheduled(command):
|
||||
return
|
||||
|
||||
if DriverStation.isDisabled() and not command.runsWhenDisabled():
|
||||
if RobotState.isDisabled() and not command.runsWhenDisabled():
|
||||
return
|
||||
|
||||
requirements = command.getRequirements()
|
||||
@@ -250,7 +250,7 @@ class CommandScheduler(Sendable):
|
||||
self._watchdog.addEpoch("buttons.run()")
|
||||
|
||||
self._inRunLoop = True
|
||||
isDisabled = DriverStation.isDisabled()
|
||||
isDisabled = RobotState.isDisabled()
|
||||
|
||||
# Run scheduled commands, remove finished commands.
|
||||
for command in self._scheduledCommands.copy():
|
||||
|
||||
Reference in New Issue
Block a user