Skip to content

Commit

Permalink
Renamed Intake Variables
Browse files Browse the repository at this point in the history
Now you know what variable is supposed to do what
  • Loading branch information
EuphoniumPlayer committed Feb 15, 2024
1 parent 87bed9e commit 3f67076
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/main/java/frc/robot/subsystems/Intake.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@

public class Intake extends SubsystemBase {

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

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

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

/** Sets the intake motors to 0% power. */
public void disableIntake() {
intakeMotor1.set(0);
intakeMotor2.set(0);
intakeSushi.set(0);
intakeFront.set(0);
}

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

@Override
Expand Down

0 comments on commit 3f67076

Please sign in to comment.