File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
src/main/java/frc/robot/subsystems Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -24,18 +24,30 @@ public void periodic() {
24
24
private Command moveUpOrDown (boolean goingUp ) {
25
25
elevator .getPosition ();
26
26
if (goingUp ) {
27
- return runOnce (() -> elevator .setPosition (0.8 ));
27
+ return runOnce (() -> elevator .set (0.8 ));
28
28
}
29
29
else {
30
- return runOnce (() -> elevator .set (0 ));
30
+ return runOnce (() -> elevator .set (- 0.8 ));
31
31
}
32
32
}
33
33
34
34
public Command motionUp () {
35
- return moveUpOrDown (true );
35
+ if (elevator .getPosition () >= 1 ) {
36
+ return runOnce (() -> elevator .set (0.5 ));
37
+ }
38
+ else {
39
+ return runOnce (() -> elevator .set (0 ));
40
+ }
41
+ // return moveUpOrDown(true);
36
42
}
37
43
38
44
public Command motionDown () {
39
- return moveUpOrDown (false );
45
+ if (elevator .getPosition () >= 1 && elevator .getPosition () <= 9 ) {
46
+ return runOnce (() -> elevator .set (-0.5 ));
47
+ }
48
+ else {
49
+ return runOnce (() -> elevator .set (0 ));
50
+ }
51
+ //return moveUpOrDown(false);
40
52
}
41
53
}
You can’t perform that action at this time.
0 commit comments