Skip to content

Commit

Permalink
Speed limiter on intake, Renamed intake motors for clarity.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kendialouge committed Feb 14, 2024
1 parent 4ae53a2 commit 5ff9ceb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ public static class OperatorConstants {
public static class MechanismConstants {

// Intake Motors
public static final int INTAKE_MOTOR_1 = 51;
public static final int INTAKE_MOTOR_2 = 52;
public static final boolean INTAKE_MOTOR_1_INVERTED = true;
public static final boolean INTAKE_MOTOR_2_INVERTED = false;
public static final double INTAKE_MOTOR_SPEED = 1;
public static final int INTAKE_MOTOR_SUSHI = 51;
public static final int INTAKE_MOTOR_FRONT = 52;
public static final boolean INTAKE_MOTOR_SUSHI_INVERTED = true;
public static final boolean INTAKE_MOTOR_FRONT_INVERTED = false;
public static final double INTAKE_MOTOR_SPEED = 0.25;

// Conveyor Motors
public static final int CONVEYOR_MOTOR_1 = 1;
public static final int CONVEYOR_MOTOR_2 = 2;
public static final boolean CONVEYOR_MOTOR_1_INVERTED = true;
public static final boolean CONVEYOR_MOTOR_2_INVERTED = false;
public static final double CONVEYOR_MOTOR_SPEED = .15;
public static final double CONVEYOR_MOTOR_SPEED = 0.25;
}
}
12 changes: 6 additions & 6 deletions src/main/java/frc/robot/subsystems/Intake.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
public class Intake extends SubsystemBase {

private final CANSparkMax intakeMotor1 =
new CANSparkMax(MechanismConstants.INTAKE_MOTOR_1, CANSparkLowLevel.MotorType.kBrushless);
new CANSparkMax(MechanismConstants.INTAKE_MOTOR_SUSHI, CANSparkLowLevel.MotorType.kBrushless);
private final CANSparkMax intakeMotor2 =
new CANSparkMax(MechanismConstants.INTAKE_MOTOR_2, CANSparkLowLevel.MotorType.kBrushless);
new CANSparkMax(MechanismConstants.INTAKE_MOTOR_FRONT, CANSparkLowLevel.MotorType.kBrushless);

/** Creates a new Intake. */
public Intake() {
intakeMotor1.setInverted(MechanismConstants.INTAKE_MOTOR_1_INVERTED);
intakeMotor2.setInverted(MechanismConstants.INTAKE_MOTOR_2_INVERTED);
intakeMotor1.setInverted(MechanismConstants.INTAKE_MOTOR_SUSHI_INVERTED);
intakeMotor2.setInverted(MechanismConstants.INTAKE_MOTOR_FRONT_INVERTED);
}

/** Sets the intake motors to 100% power. */
public void enableIntake() {
intakeMotor1.set(MechanismConstants.INTAKE_MOTOR_SPEED);
intakeMotor1.set(MechanismConstants.INTAKE_MOTOR_SPEED*0.66);
intakeMotor2.set(MechanismConstants.INTAKE_MOTOR_SPEED);
}

Expand All @@ -36,7 +36,7 @@ public void disableIntake() {

/** Sets the intake motors to -100% power. (Reverse direction) */
public void reverseIntake() {
intakeMotor1.set(-MechanismConstants.INTAKE_MOTOR_SPEED);
intakeMotor1.set(-MechanismConstants.INTAKE_MOTOR_SPEED*0.66);
intakeMotor2.set(-MechanismConstants.INTAKE_MOTOR_SPEED);
}

Expand Down

0 comments on commit 5ff9ceb

Please sign in to comment.