Skip to content

Commit 715c8e8

Browse files
committed
Update for 2027
1 parent e8cea7f commit 715c8e8

File tree

4 files changed

+6
-19
lines changed

4 files changed

+6
-19
lines changed

.github/workflows/dist.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ on:
66
push:
77
branches:
88
- main
9+
- '2027'
910
tags:
1011
- '*'
1112

1213
jobs:
1314
ci:
14-
uses: robotpy/build-actions/.github/workflows/package-pure.yml@v2025
15+
uses: robotpy/build-actions/.github/workflows/package-pure.yml@v2027
1516
with:
1617
enable_sphinx_check: false
1718
secrets:

commands2/commandscheduler.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import hal
1010
from typing_extensions import Self
1111
from wpilib import (
12-
LiveWindow,
1312
RobotBase,
1413
RobotState,
1514
TimedRobot,
@@ -59,8 +58,6 @@ def resetInstance() -> None:
5958
inst = CommandScheduler._instance
6059
if inst:
6160
inst._defaultButtonLoop.clear()
62-
LiveWindow.setEnabledCallback(lambda: None)
63-
LiveWindow.setDisabledCallback(lambda: None)
6461
SendableRegistry.remove(inst)
6562

6663
CommandScheduler._instance = None
@@ -109,18 +106,7 @@ def __init__(self) -> None:
109106

110107
self._watchdog = Watchdog(TimedRobot.kDefaultPeriod, lambda: None)
111108

112-
hal.report(
113-
hal.tResourceType.kResourceType_Command.value,
114-
hal.tInstances.kCommand2_Scheduler.value,
115-
)
116-
SendableRegistry.addLW(self, "Scheduler")
117-
118-
def _on_lw_enabled():
119-
self.disable()
120-
self.cancelAll()
121-
122-
LiveWindow.setEnabledCallback(_on_lw_enabled)
123-
LiveWindow.setDisabledCallback(self.enable)
109+
hal.reportUsage("CommandScheduler", "")
124110

125111
def setPeriod(self, period: float) -> None:
126112
"""

commands2/subsystem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Subsystem(Sendable):
3131
def __new__(cls, *arg, **kwargs) -> Self:
3232
instance = super().__new__(cls)
3333
super().__init__(instance)
34-
SendableRegistry.addLW(instance, cls.__name__, cls.__name__)
34+
SendableRegistry.add(instance, cls.__name__, cls.__name__)
3535
# add to the scheduler
3636
from .commandscheduler import CommandScheduler
3737

@@ -219,7 +219,7 @@ def addChild(self, name: str, child: Sendable) -> None:
219219
:param name: name to give child
220220
:param child: sendable
221221
"""
222-
SendableRegistry.addLW(child, self.getSubsystem(), name)
222+
SendableRegistry.add(child, self.getSubsystem(), name)
223223

224224
def initSendable(self, builder: SendableBuilder) -> None:
225225
builder.setSmartDashboardType("Subsystem")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
package_data={"commands2": ["py.typed"]},
1414
packages=["commands2"],
1515
install_requires=[
16-
"wpilib<2026,>=2025.1.1",
16+
"wpilib<2028,>=2027.0.0a2",
1717
"typing_extensions>=4.1.0,<5",
1818
],
1919
license="BSD-3-Clause",

0 commit comments

Comments
 (0)