Skip to content

Commit

Permalink
Group indexer objects in LiveWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
auscompgeek committed Mar 7, 2020
1 parent 448a5ea commit 4ab62c1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion components/indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,22 @@ def setup(self):
self.all_motors.append(self.injector_motor)

for motor in self.all_motors:
motor.setInverted(True)
motor.setNeutralMode(ctre.NeutralMode.Brake)
motor.configForwardLimitSwitchSource(
ctre.LimitSwitchSource.FeedbackConnector,
ctre.LimitSwitchNormal.NormallyOpen,
)

sendable_reg = wpilib.SendableRegistry.getInstance()
for dev in (self.intake_arm_piston, self.intake_main_motor):
sendable_reg.setSubsystem(dev, "Intake")

sendable_reg.setSubsystem(self.injector_motor, "Shooter")

for motor in self.indexer_motors:
sendable_reg.setSubsystem(motor, "Indexer")
motor.setInverted(True)

self.intake_left_motor.setInverted(False)
self.intake_right_motor.setInverted(True)

Expand Down

0 comments on commit 4ab62c1

Please sign in to comment.