Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
changed to opticalZeroSwitch.
Browse files Browse the repository at this point in the history
  • Loading branch information
NotSimon5673 committed Apr 1, 2022
1 parent 1da0e4f commit a68989f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rio/subsystems/drivetrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def __init__(self, constants, pid):

# Zeroing objects

self.forewardLimitSwitch = wpilib.digitalInput(1)
self.opticalZeroSwitch = wpilib.digitalInput(1)

self.isZeroed = False
self.zeroSwitch = self.steer_motor.getForwardLimitSwitch(
Expand Down Expand Up @@ -418,7 +418,7 @@ def find_zero(self):
"""

if not self.isZeroed:
if not self.forewardLimitSwitch.get():
if not self.opticalZeroSwitch.get():
self.steer_motor.set(0.165) # CHANGEME
else:
self.steer_motor_encoder.setPosition(0)
Expand Down

1 comment on commit a68989f

@KenwoodFox
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great :3 lets make a PR

Please sign in to comment.