diff --git a/src/org/usfirst/frc/team2059/robot/OI.java b/src/org/usfirst/frc/team2059/robot/OI.java index ecaca29..45ff3ce 100644 --- a/src/org/usfirst/frc/team2059/robot/OI.java +++ b/src/org/usfirst/frc/team2059/robot/OI.java @@ -45,7 +45,7 @@ public class OI { joystickButtons[1][2].whileHeld(new ResetLower(-1)); joystickButtons[1][3].whileHeld(new SetArmPosition(RobotMap.mainArmPresetTraverse)); joystickButtons[1][4].whileHeld(new SetArmPosition(RobotMap.mainArmPresetCloseShot)); - joystickButtons[1][5].whileHeld(new SetArmPosition(RobotMap.mainArmPresetFarShot)); + joystickButtons[1][5].whileHeld(new SetArmPosition(RobotMap.mainArmPresetLowShot)); joystickButtons[1][7].whileHeld(new SetArmStopState(true)); // joystickButtons[1][10].whileHeld(new ResetLower(-1)); // joystickButtons[1][11].whileHeld(new ResetUpper(1)); diff --git a/src/org/usfirst/frc/team2059/robot/Robot.java b/src/org/usfirst/frc/team2059/robot/Robot.java index c16ad14..c918e31 100644 --- a/src/org/usfirst/frc/team2059/robot/Robot.java +++ b/src/org/usfirst/frc/team2059/robot/Robot.java @@ -53,13 +53,18 @@ public class Robot extends IterativeRobot { autonomousCommand.cancel(); } CommandBase.pneumatics.setCompressorEnabled(true); - CommandBase.pneumatics.setArmStopState(true); + CommandBase.pneumatics.setArmStopState(false); } public void teleopPeriodic() { Scheduler.getInstance().run(); SmartDashboard.putNumber("ArmAngleRaw", CommandBase.mainArm.getRaw()); SmartDashboard.putNumber("ArmAngleDegrees", CommandBase.mainArm.getDegrees()); SmartDashboard.putNumber("tmpRotations", CommandBase.driveBase.getLeftRotations()); + if (Robot.oi.getJoysticks()[1].getRawButton(3)){ + CommandBase.pneumatics.setArmStopState(true); + } else { + CommandBase.pneumatics.setArmStopState(false); + } CommandBase.pneumatics.setCompressorEnabled(SmartDashboard.getBoolean("CompressorEnabled")); System.out.println(CommandBase.mainArm.getDegrees()); } diff --git a/src/org/usfirst/frc/team2059/robot/RobotMap.java b/src/org/usfirst/frc/team2059/robot/RobotMap.java index 2acb72d..011b69f 100644 --- a/src/org/usfirst/frc/team2059/robot/RobotMap.java +++ b/src/org/usfirst/frc/team2059/robot/RobotMap.java @@ -29,6 +29,7 @@ public class RobotMap { //Misc public static int mainArmPresetCollect = -5; public static int mainArmPresetTraverse = 10; + public static int mainArmPresetLowShot= 30; public static int mainArmPresetCloseShot = 90; public static int mainArmPresetFarShot = 70; } diff --git a/src/org/usfirst/frc/team2059/robot/subsystems/MainArm.java b/src/org/usfirst/frc/team2059/robot/subsystems/MainArm.java index 04c03a3..83b9bd0 100644 --- a/src/org/usfirst/frc/team2059/robot/subsystems/MainArm.java +++ b/src/org/usfirst/frc/team2059/robot/subsystems/MainArm.java @@ -15,7 +15,7 @@ public class MainArm extends PIDSubsystem { private double min = RobotMap.zeroDegrees; private double max = RobotMap.ninetyDegrees; public MainArm() { - super("MainArm", 0.3, 0.0, 0.4); + super("MainArm", 0.07, 0.0, 0.00); getPIDController().setContinuous(false); setSetpoint(70); enable();