Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Team334/R2024
Browse files Browse the repository at this point in the history
  • Loading branch information
cherriae committed Jan 19, 2024
2 parents 915dd90 + 9b38fa4 commit 86423a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public static class CAN {
public static final int ENC_BACK_LEFT = 12;
public static final int ENC_BACK_RIGHT = 11;

public static final int SHOOTER_LEFT = 13;
public static final int SHOOTER_RIGHT = 14;

public static final int CAN_TIMEOUT = 10;
}

Expand Down
10 changes: 6 additions & 4 deletions src/main/java/frc/robot/subsystems/ShooterSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
package frc.robot.subsystems;

import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.Constants;

import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkLowLevel.MotorType;

public class ShooterSubsystem extends SubsystemBase {
private CANSparkMax _leftMotor = new CANSparkMax(0, MotorType.kBrushless);
private CANSparkMax _rightMotor = new CANSparkMax(1, MotorType.kBrushless);
private CANSparkMax _leftMotor = new CANSparkMax(Constants.CAN.SHOOTER_LEFT, MotorType.kBrushless);
private CANSparkMax _rightMotor = new CANSparkMax(Constants.CAN.SHOOTER_RIGHT, MotorType.kBrushless);

/** Creates a new ShooterSubsystem. */
public ShooterSubsystem() {
Expand All @@ -23,8 +25,8 @@ public void periodic() {
}

public void spinMotor(){
_leftMotor.set(-1);
_rightMotor.set(1);
_leftMotor.set(-1.0);
_rightMotor.set(1.0);
}

public void stopMotors(){
Expand Down

0 comments on commit 86423a7

Please sign in to comment.