Skip to content

Commit 42a6688

Browse files
authored
Merge pull request #427 from thedropbears/remove-wrist-limit-switch
Remove wrist limit switch
2 parents 57e71e1 + 6f73b0f commit 42a6688

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

components/wrist.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import wpilib
44
from magicbot import feedback
55
from rev import (
6-
LimitSwitchConfig,
76
SparkMax,
87
SparkMaxConfig,
98
)
@@ -52,10 +51,6 @@ def __init__(self, mech_root: wpilib.MechanismRoot2d):
5251
wrist_config = SparkMaxConfig()
5352
wrist_config.inverted(False)
5453
wrist_config.setIdleMode(self.idle_mode)
55-
wrist_config.limitSwitch.reverseLimitSwitchType(
56-
LimitSwitchConfig.Type.kNormallyOpen
57-
)
58-
wrist_config.limitSwitch.reverseLimitSwitchEnabled(True)
5954

6055
self.wrist_profile = TrapezoidProfile(
6156
TrapezoidProfile.Constraints(self.WRIST_MAX_VEL, self.WRIST_MAX_ACC)
@@ -182,10 +177,6 @@ def _tilt_to(self, pos: float):
182177
def go_to_neutral(self) -> None:
183178
self.tilt_to_shooter_FOR(WristComponent.NEUTRAL_ANGLE)
184179

185-
@feedback
186-
def at_limit(self) -> bool:
187-
return self.motor.getReverseLimitSwitch().get()
188-
189180
def execute(self) -> None:
190181
self.tracked_state = self.wrist_profile.calculate(
191182
wpilib.Timer.getFPGATimestamp() - self.last_setpoint_update_time,

0 commit comments

Comments
 (0)