Skip to content

Commit

Permalink
removed unused smartdashboard controls
Browse files Browse the repository at this point in the history
  • Loading branch information
GearBoxFox committed Feb 3, 2024
1 parent 85c8b47 commit 9a8a1ba
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main/java/frc/robot/subsystems/shooter/ShooterSubsystem.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package frc.robot.subsystems.shooter;


import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import org.littletonrobotics.junction.Logger;
Expand All @@ -14,7 +12,6 @@ public class ShooterSubsystem extends SubsystemBase {
private final LoggedDashboardNumber m_leftSetpoint;
private final LoggedDashboardNumber m_rightSetpoint;

private static final String TOP_WHEEL_RATIO = "Top wheel ratio";
public ShooterSubsystem(ShooterIO io) {
m_io = io;
m_inputs = new ShooterIOInputsAutoLogged();
Expand All @@ -30,12 +27,12 @@ public void periodic() {
}

public void setShooterPowerLeft(double power) {
m_io.setMotorVoltageTL((power * 12.0) * SmartDashboard.getNumber(TOP_WHEEL_RATIO, 0.85));
m_io.setMotorVoltageTL(power * 12.0);
m_io.setMotorVoltageBL(power * 12.0);
}

public void setShooterPowerRight(double power) {
m_io.setMotorVoltageTR((power * 12.0) * SmartDashboard.getNumber(TOP_WHEEL_RATIO, 0.85));
m_io.setMotorVoltageTR(power * 12.0);
m_io.setMotorVoltageBR(power * 12.0);
}

Expand All @@ -54,8 +51,8 @@ public void runShooterVelocity() {

public Command setShooterPowerFactory(double left, double right) {
return run(() -> {
setShooterPowerLeft(left == 0.0 ? 0.0 : SmartDashboard.getNumber("Left wheel", 0.6));
setShooterPowerRight(right == 0.0 ? 0.0 : SmartDashboard.getNumber("Right wheel", 0.6));
setShooterPowerLeft(left);
setShooterPowerRight(right);
setKickerPower(left == 0.0 ? 0.0 : 1.0);
setIntakePower(left == 0.0 ? 0.0 : 0.35);
});
Expand Down

0 comments on commit 9a8a1ba

Please sign in to comment.