Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Merge pull request #24 from FRC-1721/feat/controllerUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
Kredcool authored Mar 14, 2024
2 parents af9ceb4 + c9b7716 commit 1e6d8c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 9 additions & 0 deletions rio/robotcontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ def __init__(self) -> None:
)
)

self.shooter.setDefaultCommand(
commands2.cmd.run(
lambda: self.shooter.setFlyWheelSpeed(
self.opController.getRawAxis(2) + 0.16
),
self.shooter,
)
)

def configureButtonBindings(self) -> None:
"""
Use this method to define your button->command mappings. Buttons can be created by
Expand Down
8 changes: 0 additions & 8 deletions rio/subsystems/shooter.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ def isReady(self):
def currentSpeed(self) -> float:
return self.flyEncoder.getVelocity()

def setIdleBrake(self):
self.flyMotor.setIdleMode(CANSparkBase.IdleMode.kBrake)
self.flyMotor.burnFlash()

def setIdleCoast(self):
self.flyMotor.setIdleMode(CANSparkBase.IdleMode.kCoast)
self.flyMotor.burnFlash()

def setFlyAngle(self, angle: float):
self.flyPIDController.setReference(angle, CANSparkMax.ControlType.kPosition)

Expand Down

0 comments on commit 1e6d8c3

Please sign in to comment.