Skip to content

Commit

Permalink
Updated Constants Pt. 1
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-les committed Oct 8, 2024
1 parent 45b1c7e commit 60a4bcc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/main/java/frc/team3128/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,9 @@ public static class ShooterConstants {
public static final double MIDDLE_FEED_RPM = 4500;
public static final double MIDDLE_FEED_ANGLE = 25;

public static final double INTAKE_POWER = 0.4;
public static final double KICK_POWER = 0.2;
public static final double INTAKE_POWER = 0.65;
public static final double KICK_POWER = 0.5;
public static final double KICK_SHOOTING_POWER = 0.8;
public static final double CURRENT_TEST_POWER = 0;
public static final double CURRENT_TEST_PLATEAU = 0;
public static final double CURRENT_TEST_TIMEOUT = 0;
Expand Down Expand Up @@ -409,7 +410,7 @@ public static class HopperConstants {
public static final int HOPPER_BACK_SENSOR_ID = 2;

public static final double STALL_CURRENT = 50;
public static final double HOPPER_INTAKE_POWER = 0.5;
public static final double HOPPER_INTAKE_POWER = 0.8;
public static final double HOPPER_OUTTAKE_POWER = -0.5;
public static final double STALL_POWER = 0.05;

Expand Down
13 changes: 8 additions & 5 deletions src/main/java/frc/team3128/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
import static edu.wpi.first.wpilibj2.command.Commands.*;
import static frc.team3128.Constants.ShooterConstants.EDGE_FEED_ANGLE;
import static frc.team3128.Constants.ShooterConstants.EDGE_FEED_RPM;
import static frc.team3128.Constants.ShooterConstants.KICK_POWER;
import static frc.team3128.Constants.ShooterConstants.KICK_SHOOTING_POWER;
import static frc.team3128.Constants.ShooterConstants.MAX_RPM;
import static frc.team3128.Constants.ShooterConstants.MIDDLE_FEED_ANGLE;
import static frc.team3128.Constants.ShooterConstants.MIDDLE_FEED_RPM;
import static frc.team3128.Constants.HopperConstants.HOPPER_INTAKE_POWER;
import static frc.team3128.commands.CmdManager.*;

import org.photonvision.PhotonPoseEstimator.PoseStrategy;
Expand Down Expand Up @@ -117,7 +120,7 @@ private void configureButtonBindings() {

controller.getButton(XboxButton.kA).onTrue(Shooter.getInstance().runShooter(0.8));
controller.getButton(XboxButton.kY).onTrue(Shooter.getInstance().runShooter(0));
controller.getButton(XboxButton.kB).onTrue(Shooter.getInstance().runKickMotor(0.8)).onFalse(Shooter.getInstance().runKickMotor(0));
controller.getButton(XboxButton.kB).onTrue(Shooter.getInstance().runKickMotor(KICK_SHOOTING_POWER)).onFalse(Shooter.getInstance().runKickMotor(0));

controller.getButton(XboxButton.kY).whileTrue(ampUp()).onFalse(ampFinAndDown());

Expand All @@ -126,7 +129,7 @@ private void configureButtonBindings() {

new Trigger(()-> Shooter.getInstance().getShooting())
.onTrue(sequence(
Shooter.getInstance().runKickMotor(.5),
Shooter.getInstance().runKickMotor(KICK_POWER),
Hopper.getInstance().runManipulator(.8)
))
.onFalse(sequence(
Expand All @@ -141,7 +144,7 @@ private void configureButtonBindings() {

new Trigger(()-> Intake.getInstance().getMeasurement() > 90)
.and(()->!Hopper.getInstance().hasObjectPresent())
.onTrue(Hopper.getInstance().runManipulator(0.8))
.onTrue(Hopper.getInstance().runManipulator(HOPPER_INTAKE_POWER))
.onFalse(Hopper.getInstance().runManipulator(0));

new Trigger(()-> Intake.getInstance().getMeasurement() < 20)
Expand All @@ -152,8 +155,8 @@ private void configureButtonBindings() {
.and(()->Hopper.getInstance().hasObjectPresent())
.and(() -> !Shooter.getInstance().getShooting())
.onTrue(sequence(
Shooter.getInstance().runKickMotor(0.5),
Hopper.getInstance().runManipulator(0.8)
Shooter.getInstance().runKickMotor(KICK_POWER),
Hopper.getInstance().runManipulator(HOPPER_INTAKE_POWER)
))
.onFalse(sequence(
Shooter.getInstance().runKickMotor(-.1),
Expand Down

0 comments on commit 60a4bcc

Please sign in to comment.