Skip to content

Commit

Permalink
rename function (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wu-Fan-529 authored Nov 9, 2024
1 parent f22b793 commit 3064c1a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
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

0 comments on commit 3064c1a

Please sign in to comment.