File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
commands/ShooterArmCommands Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -230,8 +230,7 @@ public static class ShooterArmConstants {
230
230
public static final double backwordLimit = 300 ;
231
231
232
232
// ArmPoseReset Constant
233
- public static final double poseReset = 0.0 ;
234
-
235
- public static final double ArmStaticMovmentSpeed = -1 ;
233
+ public static final double resetPose = 0.0 ;
234
+ public static final double resetSpeed = -1 ;
236
235
}
237
236
}
Original file line number Diff line number Diff line change 5
5
package frc .robot .commands .ShooterArmCommands ;
6
6
7
7
import edu .wpi .first .wpilibj2 .command .Command ;
8
+ import frc .robot .Constants ;
8
9
import frc .robot .subsystems .ShooterArmSubsystem ;
9
10
11
+ import static frc .robot .Constants .ShooterArmConstants .*;
12
+
13
+
10
14
public class MoveShooterArmUntil extends Command {
11
15
/** Creates a new ResetShooterArmPos. */
12
16
private final ShooterArmSubsystem shooterArmSubsystem = ShooterArmSubsystem .getInstance ();
@@ -18,14 +22,14 @@ public MoveShooterArmUntil() {
18
22
// Called when the command is initially scheduled.
19
23
@ Override
20
24
public void initialize () {
21
- shooterArmSubsystem .moveArmByVoltage ();
25
+ shooterArmSubsystem .movementArmToReset ();
22
26
}
23
27
24
28
25
29
// Called once the command ends or is interrupted.
26
30
@ Override
27
31
public void end (boolean interrupted ) {
28
- shooterArmSubsystem .setPosition (0 );
32
+ shooterArmSubsystem .setPosition (resetPose );
29
33
}
30
34
31
35
// Returns true when the command should end.
Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ public boolean getSwitch(){
101
101
return this .limitSwitch .get ();
102
102
}
103
103
104
- public void moveArmByVoltage (){
105
- m_ArmMotor .setVoltage ( ArmStaticMovmentSpeed );
104
+ public void movementArmToReset (){
105
+ m_ArmMotor .set ( resetSpeed );
106
106
}
107
107
108
108
You can’t perform that action at this time.
0 commit comments