Merge branch 'Khangs_Branch' of https://github.com/IronEaglesRobotics/CenterStage into Khangs_Branch

This commit is contained in:
Scott Barnes 2023-12-01 20:40:28 -06:00
commit 22a2c6627e
2 changed files with 5 additions and 2 deletions

View File

@ -18,7 +18,7 @@ public class Arm {
private Slides.Position pos = Slides.Position.DOWN; private Slides.Position pos = Slides.Position.DOWN;
private PController armController; private PController armController;
private double armControllerTarget; private double armControllerTarget;
private double ARM_KP = 0.001; public static double ARM_KP = 0.01;
public enum Position { public enum Position {

View File

@ -21,7 +21,7 @@ public class Intake {
} }
public Position previousPosition() { public Position previousPosition() {
int backOne = (this.ordinal() - 1) % Position.values().length; int backOne =Math.max(0,(this.ordinal() - 1) % Position.values().length);
return Position.values()[backOne]; return Position.values()[backOne];
} }
} }
@ -77,6 +77,9 @@ public class Intake {
if (pwr >= 0.01) { if (pwr >= 0.01) {
this.setpos(this.pos); this.setpos(this.pos);
} }
else {
this.setpos(Position.UP);
}
} }
public double getPower() { public double getPower() {