Skip to content

Commit

Permalink
make shoot piece take in (left, right) and follow that convention wit…
Browse files Browse the repository at this point in the history
…h all calls
  • Loading branch information
jpothen8 committed Apr 16, 2024
1 parent 4d717ef commit 5c8f929
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ object SpinShooterConstants {
const val SECONDARY_CURRENT_LIMIT = 200.0
const val BRAKE_MODE = false

val SUBWOOFER_LEFT_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(2800.0)
val SUBWOOFER_RIGHT_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(3450.0)
val ANYWHERE_LEFT_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(3850.0)
val ANYWHERE_RIGHT_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(4850.0)
val PASS_LEFT_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(3500.0)
val PASS_RIGHT_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(4500.0)
val SUBWOOFER_LEFT_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(3450.0)
val SUBWOOFER_RIGHT_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(2800.0)
val ANYWHERE_LEFT_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(4850.0)
val ANYWHERE_RIGHT_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(3850.0)
val PASS_LEFT_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(4500.0)
val PASS_RIGHT_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(3500.0)
val AMP_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(1800.0)
val OUTTAKE_SPEED = Units.rotationsPerMinuteToRadiansPerSecond(-200.0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ open class SpinShooter(
fun shootSubwoofer(): Command {
val cmd = this.run {
shootPiece(
SpinShooterConstants.SUBWOOFER_RIGHT_SPEED,
SpinShooterConstants.SUBWOOFER_LEFT_SPEED
SpinShooterConstants.SUBWOOFER_LEFT_SPEED,
SpinShooterConstants.SUBWOOFER_RIGHT_SPEED
)
}
cmd.name = "shooting subwoofer"
Expand Down Expand Up @@ -461,7 +461,7 @@ open class SpinShooter(
return cmd
}

fun shootPiece(rightSpeed: Double, leftSpeed: Double) {
fun shootPiece(leftSpeed: Double, rightSpeed: Double) {
if (DriverStation.isDisabled()) {
correct()
} else {
Expand Down Expand Up @@ -525,8 +525,8 @@ open class SpinShooter(
},
this.run {
shootPiece(
rightRateLimiter.calculate(0.0),
leftRateLimiter.calculate(0.0)
leftRateLimiter.calculate(0.0),
rightRateLimiter.calculate(0.0)
)
}.until {
abs(leftVelocity.get()) < SpinShooterConstants.MIN_COAST_VEL &&
Expand Down

0 comments on commit 5c8f929

Please sign in to comment.