Skip to content

Commit

Permalink
Welcome day changes
Browse files Browse the repository at this point in the history
  • Loading branch information
team6101 committed Sep 5, 2024
1 parent 2340804 commit f7747a8
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class Constants {

/*INTAKE CONFIG */
public static final double FLOOR_INTAKE_SPEED = 1.00;
public static final double SOURCE_INTAKE_SPEED = -0.50;
public static final double SOURCE_INTAKE_SPEED = -0.30;

public static final int INTAKE_BEAM_BREAK_ID = 0;

Expand Down
20 changes: 10 additions & 10 deletions src/main/java/frc/robot/InputtedCoDriverControls.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package frc.robot;

import edu.wpi.first.wpilibj.XboxController;
import frc.robot.auton.AutonAction;
import frc.robot.auton.AutonMoveHoodToPosition.HoodPosition;
import frc.robot.robotcomponents.Climber;
import frc.robot.robotcomponents.Intake;
Expand Down Expand Up @@ -30,13 +31,13 @@ public static void onEveryFrame() {
Shooter.stopShooterMotors();
}

if (controller.getAButtonPressed()) {
Intake.startSourceIntake();
}
// TODO add this: && !Shooter.isPositioningRing() when mechanics adds a breambreak sensor (never)
if (controller.getAButtonReleased()) {
Intake.stopSourceIntake();
}
// if (controller.getAButtonPressed()) {
// Intake.startSourceIntake();
// }
// // TODO add this: && !Shooter.isPositioningRing() when mechanics adds a breambreak sensor (never)
// if (controller.getAButtonReleased()) {
// Intake.stopSourceIntake();
// }

if (controller.getBackButton()) {
Climber.manualExtendArms();
Expand All @@ -57,16 +58,15 @@ public static void onEveryFrame() {
// // TODO add 3rd position if needed
// }
if (controller.getBButton()) {
Intake.startFloorIntake();
Intake.startSourceIntake();
// TODO add this: && !Shooter.isPositioningRing() when mechanics adds a breambreak sensor (never)
} else if (controller.getBButtonReleased()) {
Intake.stopFloorIntake();
Intake.stopSourceIntake();
}
if (controller.getPOV() == 0) {
Intake.backtrack();
Shooter.backtrack();
} else if (controller.getPOV() == -1 && lastPOV != -1) {
Intake.stopFloorIntake();
Shooter.stopShooterMotors();
}
lastPOV = controller.getPOV();
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/frc/robot/InputtedDriverControls.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ public static void onEveryFrame() {
if (controller.getLeftBumper()) {
Intake.startFloorIntake();
}
if (controller.getLeftBumperReleased()) {
Intake.stopFloorIntake();
}
//This isn't probably helpful, but if the controllers somehow switch mid match, this box will turn red
if (controller.getRightX() <= -0.99 && Math.abs(controller.getRightY()) < 0.01) {
framesWithBadInput++;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class Robot extends TimedRobot {
Constants.RIGHT_CLIMB_ID,
MotorController.Type.SparkMaxBrushed
);
MotorController intake = MotorControllerFactory.create(Constants.INTAKE_ID, MotorController.Type.SparkMaxBrushed);
// MotorController intake = MotorControllerFactory.create(Constants.INTAKE_ID, MotorController.Type.SparkMaxBrushed);
// MotorController hoodAdjuster = MotorControllerFactory.create(
// Constants.SHOOTER_HOOD_ADJUSTERER_ID,
// MotorController.Type.SparkMaxBrushed
Expand Down Expand Up @@ -206,8 +206,8 @@ public boolean isFinished() {
.leftFlywheel(leftFlywheel)
.rightFlywheel(rightFlywheel)
.leftClimb(leftClimb)
.rightClimb(rightClimb)
.intake(intake);
.rightClimb(rightClimb);
// .intake(intake);
// .hoodAdjuster(hoodAdjuster);
// getGyroscope().reset();
System.out.println(Constants.APRIL_TAG_CONFIDENCE_FRAMES);
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/frc/robot/RobotComponents/Intake.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public static void startFloorIntake() {
// if (!Robot.getTeleopActionRunner().containsAction(AutonFloorIntake.class)) {
// Robot.getTeleopActionRunner().addActionToRun(new AutonFloorIntake());
// }
Robot.motors.getIntake().set(Constants.FLOOR_INTAKE_SPEED);
Robot.motors.getFeeder().set(Constants.FLOOR_INTAKE_SPEED);
}

Expand All @@ -35,9 +34,7 @@ public static void startSourceIntake() {
}

/* This will spin the motor backwards in an attempt to eject a stuck note*/
public static void backtrack() {
Robot.motors.getIntake().set(Constants.MOTOR_BACKTRACK_SPEED_PERCENT);
}
public static void backtrack() {}

public static void stopSourceIntake() {
// Robot.getTeleopActionRunner().removeActionsOfType(AutonSourceIntake.class);
Expand All @@ -46,7 +43,6 @@ public static void stopSourceIntake() {
}

public static void stopFloorIntake() {
Robot.motors.getIntake().stopMotor();
Robot.motors.getFeeder().stopMotor();
// Robot.getTeleopActionRunner().removeActionsOfType(AutonFloorIntake.class);
}
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/frc/robot/RobotComponents/Shooter.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,9 @@ public static void moveHoodToShootingPosition() {
public static void stopHoodMotors() {
Robot.motors.getHoodAdjuster().stopMotor();
}

public static void stopFeedMotors() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'stopFeedMotors'");
}
}
2 changes: 0 additions & 2 deletions src/main/java/frc/robot/auton/AutonFloorIntake.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ public boolean isDone() {

@Override
public void initiate() {
Robot.motors.getIntake().set(Constants.FLOOR_INTAKE_SPEED);
Robot.motors.getFeeder().set(Constants.FEEDER_MOTOR_SPEED);
Shooter.setCurrentlyPositioningRing(false);
}

@Override
public void shutdown() {
Robot.motors.getIntake().stopMotor();
Robot.motors.getFeeder().stopMotor();
Shooter.setCurrentlyPositioningRing(false);
}
Expand Down

0 comments on commit f7747a8

Please sign in to comment.