[wpilib] Split DriverStation into smaller classes (#8628)

This commit is contained in:
Thad House
2026-04-18 19:56:45 -07:00
committed by GitHub
parent 58ad633ae2
commit ab2aef2c29
108 changed files with 4406 additions and 3211 deletions

View File

@@ -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():