Skip to content

Commit

Permalink
shooter + feeder testing 02/08
Browse files Browse the repository at this point in the history
  • Loading branch information
jpothen8 committed Feb 9, 2024
1 parent ab5752c commit 439c6e2
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ object SwerveConstants {
const val DRIVE_GEARING = (14.0 / 50.0) * (28.0 / 16.0) * (15.0 / 45.0)
const val DRIVE_UPR = 0.31818905832
const val TURN_UPR = 2 * Math.PI
const val MAX_ATTAINABLE_MK4I_SPEED = 0.01
const val MAX_ATTAINABLE_MK4I_SPEED = (12 - DRIVE_KS) / DRIVE_KV
const val DRIVE_CURRENT_LIM = 55
const val STEERING_CURRENT_LIM = 40
const val JOYSTICK_FILTER_ORDER = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ object FeederConstants {
const val INVERTED = true
const val CURRENT_LIM = 20

const val GEARING = 1.0 / 9.0

const val INTAKE_VOLTAGE = 12.0
const val REVERSE_VOLTAGE = -5.0
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object ShooterConstants {
const val RIGHT_KS = 0.0

const val AMP_SCORE_VOLTAGE = 4.0
const val DURING_INTAKE_VOLTAGE = -3.0
const val DURING_INTAKE_VOLTAGE = -1.0

/** In meters from the ground */
const val SHOOTER_HEIGHT = 0.25
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ object UndertakerConstants {
const val INVERTED = true
const val CURRENT_LIM = 40

const val INTAKE_VOLTAGE = 8.0
const val REVERSE_VOLTAGE = -6.0
const val GEARING = 1.0 / 3.0

const val INTAKE_VOLTAGE = 12.0
const val REVERSE_VOLTAGE = -12.0
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,26 @@ class ControllerBindings(
FieldConstants.SUBWOOFER_POSE
)

val intakeCommand = ConditionalCommand(
ParallelCommandGroup(
robot.undertaker.intake(),
robot.feeder.intake(),
robot.shooter.duringIntake()
),
ParallelCommandGroup(
robot.undertaker.stop(),
robot.feeder.stop(),
robot.shooter.stop()
)
) { robot.infrared.get() }

private fun robotBindings() {
driveController.rightBumper().onTrue(
if (!robot.infrared.get()) {
ParallelCommandGroup(
robot.undertaker.intake(),
robot.feeder.intake(),
robot.shooter.duringIntake()
)
} else {
ParallelCommandGroup(
robot.undertaker.stop(),
robot.feeder.stop(),
robot.shooter.stop()
)
}
driveController.rightBumper().whileTrue(
ParallelCommandGroup(
robot.undertaker.intake(),
robot.feeder.intake(),
robot.shooter.shootSubwoofer()
)
).onFalse(
ParallelCommandGroup(
robot.undertaker.stop(),
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/frc/team449/robot2024/subsystems/Feeder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Feeder(
FeederConstants.MOTOR_ID,
NEOEncoder.creator(
1.0,
1.0
FeederConstants.GEARING
),
inverted = FeederConstants.INVERTED,
currentLimit = FeederConstants.CURRENT_LIM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Undertaker(
UndertakerConstants.MOTOR_ID,
NEOEncoder.creator(
1.0,
1.0
UndertakerConstants.GEARING
),
inverted = UndertakerConstants.INVERTED,
currentLimit = UndertakerConstants.CURRENT_LIM,
Expand Down

0 comments on commit 439c6e2

Please sign in to comment.