Skip to content

Commit 9cf1f96

Browse files
committed
remove wrist limit switch
1 parent 741c9bf commit 9cf1f96

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
)
@@ -47,10 +46,6 @@ def __init__(self, mech_root: wpilib.MechanismRoot2d):
4746
wrist_config = SparkMaxConfig()
4847
wrist_config.inverted(False)
4948
wrist_config.setIdleMode(self.idle_mode)
50-
wrist_config.limitSwitch.reverseLimitSwitchType(
51-
LimitSwitchConfig.Type.kNormallyOpen
52-
)
53-
wrist_config.limitSwitch.reverseLimitSwitchEnabled(True)
5449

5550
self.wrist_profile = TrapezoidProfile(
5651
TrapezoidProfile.Constraints(self.WRIST_MAX_VEL, self.WRIST_MAX_ACC)
@@ -153,10 +148,6 @@ def _tilt_to(self, pos: float):
153148
def go_to_neutral(self) -> None:
154149
self.tilt_to(WristComponent.NEUTRAL_ANGLE)
155150

156-
@feedback
157-
def at_limit(self) -> bool:
158-
return self.motor.getReverseLimitSwitch().get()
159-
160151
def execute(self) -> None:
161152
tracked_state = self.wrist_profile.calculate(
162153
wpilib.Timer.getFPGATimestamp() - self.last_setpoint_update_time,

0 commit comments

Comments
 (0)