Skip to content

Commit

Permalink
add shooter code
Browse files Browse the repository at this point in the history
  • Loading branch information
k4limul committed Jan 22, 2025
1 parent a1dce28 commit 818215c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.stuypulse.robot.commands.shooter;

import com.stuypulse.robot.subsystems.shooter.Shooter;
import com.stuypulse.robot.subsystems.shooter.Shooter.ShooterState;


import edu.wpi.first.wpilibj2.command.InstantCommand;

Expand All @@ -15,6 +15,6 @@ public ShooterShoot() {

@Override
public void initialize() {
shooter.setShooterState(ShooterState.SHOOTING);
shooter.shoot();
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.stuypulse.robot.commands.shooter;

import com.stuypulse.robot.subsystems.shooter.Shooter;
import com.stuypulse.robot.subsystems.shooter.Shooter.ShooterState;

import edu.wpi.first.wpilibj2.command.InstantCommand;

Expand All @@ -15,6 +14,6 @@ public ShooterStop() {

@Override
public void initialize() {
shooter.setShooterState(ShooterState.STOP);
shooter.stop();
}
}
9 changes: 3 additions & 6 deletions src/main/java/com/stuypulse/robot/constants/Ports.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ public interface Gamepad {
}

public interface Shooter {
int LEFT_MOTOR = 0;
int RIGHT_MOTOR = 0;

int LEFT_ENCODER = 0;
int RIGHT_ENCODER = 0;
int SHOOTER_MOTOR = 0;
}
}

public interface Elevator {
int LEFT = 0;
int RIGHT = 1;
Expand All @@ -32,3 +28,4 @@ public interface Algae {
int PIVOT_ID = 1; // update ports later
}
}

1 change: 0 additions & 1 deletion src/main/java/com/stuypulse/robot/constants/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public interface FF {
SmartNumber kG = new SmartNumber("kG", 0.37);
}
}
}

public interface Algae {
double RAISED_ANGLE = 0.0; // CHANGE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

public class AlgaeImpl extends Algae {

// variable declaration


// variable declaration
private SparkMax pivotMotor;
private SparkMax rollerMotor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static Shooter getInstance() {

public Shooter(){
super();
shooterMotor = new SparkMax(Ports.Shooter.LEFT_MOTOR, MotorType.kBrushless);
shooterMotor = new SparkMax(Ports.Shooter.SHOOTER_MOTOR, MotorType.kBrushless);
}

public void shoot() {
Expand Down

0 comments on commit 818215c

Please sign in to comment.