Skip to content

Commit 910783c

Browse files
cwstrykervirtuald
authored andcommitted
Added TTrapezoidProfile to profiledpidsubsystem.py
1 parent e6132d5 commit 910783c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

commands2/profiledpidsubsystem.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
from wpimath.trajectory import TrapezoidProfile
88

99
from .subsystem import Subsystem
10-
from .typing import TProfiledPIDController
10+
from .typing import TProfiledPIDController, TTrapezoidProfileState
1111

1212

13-
class ProfiledPIDSubsystem(Subsystem, Generic[TProfiledPIDController]):
13+
class ProfiledPIDSubsystem(
14+
Subsystem, Generic[TProfiledPIDController, TTrapezoidProfileState]
15+
):
1416
"""
1517
A subsystem that uses a :class:`wpimath.controller.ProfiledPIDController`
1618
or :class:`wpimath.controller.ProfiledPIDControllerRadians` to
@@ -49,7 +51,7 @@ def setGoal(self, goal):
4951
"""
5052
self._controller.setGoal(goal)
5153

52-
def useOutput(self, output: float, setpoint: TrapezoidProfile.State):
54+
def useOutput(self, output: float, setpoint: TTrapezoidProfileState):
5355
"""
5456
Uses the output from the controller object.
5557
"""

0 commit comments

Comments
 (0)