Skip to content

Commit

Permalink
controller bindings and constants
Browse files Browse the repository at this point in the history
  • Loading branch information
elwo-boop committed Feb 6, 2024
1 parent a390654 commit a0f712c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package frc.team449.robot2024.constants.subsystem

object FeederConstants {
const val MOTOR_ID = 57
const val FOLLOLWER_ID = 56
const val FOLLOWER_INV = false
const val MOTOR_ID = 44
const val INVERTED = true
const val CURRENT_LIM = 15

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import edu.wpi.first.math.numbers.N3

object ShooterConstants {
const val EFFICIENCY = 1.0
const val RIGHT_MOTOR_ID = 60
const val RIGHT_MOTOR_ID = 45
const val RIGHT_MOTOR_INVERTED = false
const val LEFT_MOTOR_ID = 61
const val LEFT_MOTOR_ID = 46
const val LEFT_MOTOR_INVERTED = false
const val CURRENT_LIMIT = 40

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,26 @@ class ControllerBindings(
)

private fun robotBindings() {
mechanismController.rightBumper().onTrue(
robot.undertaker.intake()
).onFalse(
robot.undertaker.stop()

driveController.rightBumper().onTrue(
robot.undertaker.intake().andThen(
robot.feeder.intake()
)).onFalse(
robot.undertaker.stop().andThen(
robot.feeder.stop()
)
)

mechanismController.leftBumper().onTrue(
robot.undertaker.outtake()
).onFalse(
robot.undertaker.stop()
driveController.leftBumper().onTrue(
robot.undertaker.outtake().andThen(
robot.feeder.outtake()
)).onFalse(
robot.undertaker.stop().andThen(
robot.feeder.stop()
)
)

// /** Shooting from anywhere */
/** Shooting from anywhere */
// mechanismController.a().onTrue(
// ParallelCommandGroup(
// orbitCmd,
Expand All @@ -57,21 +64,21 @@ class ControllerBindings(
// )

// mechanismController.b().onTrue(
// robot.pivot.moveAmp()
// )
//
// mechanismController.x().onTrue(
// robot.pivot.moveSubwoofer()
// )
//
// mechanismController.a().onTrue(
// robot.pivot.moveStow()
// robot.pivot()
// )

mechanismController.x().onTrue(
robot.pivot.moveAmp()
)

mechanismController.a().onTrue(
robot.pivot.moveStow()
)
}

private fun evergreenBindings() {
private fun nonRobotBindings() {
// slow drive
driveController.rightTrigger(0.75).onTrue(
driveController.rightTrigger(0.5).onTrue(
InstantCommand({ robot.drive.maxLinearSpeed = 1.0 })
.andThen(InstantCommand({ robot.drive.maxRotSpeed = PI / 4 }))
).onFalse(
Expand Down Expand Up @@ -99,7 +106,7 @@ class ControllerBindings(
}

fun bindButtons() {
evergreenBindings()
nonRobotBindings()
robotBindings()
}
}
1 change: 0 additions & 1 deletion src/main/kotlin/frc/team449/robot2024/subsystems/Feeder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class Feeder(
),
inverted = FeederConstants.INVERTED,
currentLimit = FeederConstants.CURRENT_LIM,
slaveSparks = mapOf(Pair(FeederConstants.FOLLOLWER_ID, FeederConstants.FOLLOWER_INV))
)

return Feeder(motor)
Expand Down

0 comments on commit a0f712c

Please sign in to comment.