Skip to content

Commit 04a9ad7

Browse files
committed
created the startPose and change the func to get speed
1 parent bfcdee2 commit 04a9ad7

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/main/java/frc/robot/Constants.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ public static class ShooterArmConstants {
231231

232232
// ArmPoseReset Constant
233233
public static final double resetPose = 0.0;
234-
public static final double resetSpeed = -1;
234+
public static final double resetSpeed = -1.0;
235+
236+
public static final double startPose =0.0;
237+
235238
}
236239
}

src/main/java/frc/robot/commands/ShooterArmCommands/MoveShooterArmUntil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ public MoveShooterArmUntil() {
2222
// Called when the command is initially scheduled.
2323
@Override
2424
public void initialize() {
25-
shooterArmSubsystem.movementArmToReset();
25+
shooterArmSubsystem.moveArmBySpeed(resetSpeed);
2626
}
2727

2828

2929
// Called once the command ends or is interrupted.
3030
@Override
3131
public void end(boolean interrupted) {
32-
shooterArmSubsystem.setPosition(resetPose);
32+
shooterArmSubsystem.setPosition(startPose);
3333
}
3434

3535
// Returns true when the command should end.

src/main/java/frc/robot/subsystems/ShooterArmSubsystem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private ShooterArmSubsystem() {
7272
if (!statusCode.isOK())
7373
System.out.println("Arm could not apply config, error code:" + statusCode.toString());
7474

75-
m_ArmMotor.setPosition(0);
75+
m_ArmMotor.setPosition(startPose);
7676

7777
}
7878

@@ -101,8 +101,8 @@ public boolean getSwitch(){
101101
return this.limitSwitch.get();
102102
}
103103

104-
public void movementArmToReset(){
105-
m_ArmMotor.set(resetSpeed);
104+
public void moveArmBySpeed(double speed){
105+
m_ArmMotor.set(speed);
106106
}
107107

108108

0 commit comments

Comments
 (0)