Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename function #38

Merged
merged 1 commit into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/EjectGP.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void execute() {
// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {
globalHopper.setHopperMotorNuetralOutput();
globalHopper.setOrientationMotorNuetralOutput();
globalIntake.setIntakeNuetralOutput();
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/commands/Shoot.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public Shoot(Stager passedStager, Shooter passedShooter) {
public void initialize() {
// The speed need to change to a real number.
if ((globalShooter.getPropelMotorVelocity() > 1) && (globalShooter.getSpiralMotorVelocity() > 1)) {
globalStager.setConveyorMotorVelocity(0.3);
globalStager.setStagerMotorVelocity(0.3);
} else {
globalStager.setConveyorMotorVelocity(0);
globalStager.setStagerMotorVelocity(0);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/frc/robot/commands/StageGP.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ public StageGP(Stager passedStager) {
// Called when the command is initially scheduled.
@Override
public void initialize() {
globalStager.setConveyorMotorVelocity(0.3);
globalStager.setStagerMotorVelocity(0.3);
}

// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
if (globalStager.getHasGP()) {
globalStager.setConveyorMotorVelocity(0);
globalStager.setStagerMotorVelocity(0);
} else {
globalStager.setConveyorMotorVelocity(0.3);
globalStager.setStagerMotorVelocity(0.3);
}
}

// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {
globalStager.setConveyorMotorVelocity(0);
globalStager.setStagerMotorVelocity(0);
}

// Returns true when the command should end.
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/frc/robot/commands/intakeHopper.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ public intakeHopper(Hopper subHopper) {
@Override
public void initialize() {

subHopper.setHopperMotorSpeed(.5);
subHopper.setOrientationMotorSpeed(.5);
}

// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
if (subHopper.isHopperFull()) {
subHopper.setHopperMotorNuetralOutput();
subHopper.setOrientationMotorNuetralOutput();
} else {
subHopper.setHopperMotorSpeed(.5);
subHopper.setOrientationMotorSpeed(.5);
}

}

// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {
subHopper.setHopperMotorNuetralOutput();
subHopper.setOrientationMotorNuetralOutput();
}

// Returns true when the command should end.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/subsystems/Hopper.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ public Hopper() {

}

public void setHopperMotorSpeed(double speed) {
public void setOrientationMotorSpeed(double speed) {
orientationMotor.set(speed);
}

public void setHopperMotorNuetralOutput() {
public void setOrientationMotorNuetralOutput() {
orientationMotor.set(0);
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/subsystems/Stager.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public Stager() {
hasGP = new DigitalInput(RobotMap.mapStager.HAS_GP_DIO);
}

public void setConveyorMotorVelocity(double velocity) {
public void setStagerMotorVelocity(double velocity) {
stagerMotor.set(velocity);
}

public void setConveyorMotorVelocityNuetralOutput() {
public void setStagerMotorVelocityNuetralOutput() {
stagerMotor.set(0);
}

Expand Down