added dumb method of stop retraction
This commit is contained in:
parent
a396a7200b
commit
4e86a8e6fa
@ -45,7 +45,7 @@ public class OI {
|
|||||||
joystickButtons[1][2].whileHeld(new ResetLower(-1));
|
joystickButtons[1][2].whileHeld(new ResetLower(-1));
|
||||||
joystickButtons[1][3].whileHeld(new SetArmPosition(RobotMap.mainArmPresetTraverse));
|
joystickButtons[1][3].whileHeld(new SetArmPosition(RobotMap.mainArmPresetTraverse));
|
||||||
joystickButtons[1][4].whileHeld(new SetArmPosition(RobotMap.mainArmPresetCloseShot));
|
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][7].whileHeld(new SetArmStopState(true));
|
||||||
// joystickButtons[1][10].whileHeld(new ResetLower(-1));
|
// joystickButtons[1][10].whileHeld(new ResetLower(-1));
|
||||||
// joystickButtons[1][11].whileHeld(new ResetUpper(1));
|
// joystickButtons[1][11].whileHeld(new ResetUpper(1));
|
||||||
|
@ -53,13 +53,18 @@ public class Robot extends IterativeRobot {
|
|||||||
autonomousCommand.cancel();
|
autonomousCommand.cancel();
|
||||||
}
|
}
|
||||||
CommandBase.pneumatics.setCompressorEnabled(true);
|
CommandBase.pneumatics.setCompressorEnabled(true);
|
||||||
CommandBase.pneumatics.setArmStopState(true);
|
CommandBase.pneumatics.setArmStopState(false);
|
||||||
}
|
}
|
||||||
public void teleopPeriodic() {
|
public void teleopPeriodic() {
|
||||||
Scheduler.getInstance().run();
|
Scheduler.getInstance().run();
|
||||||
SmartDashboard.putNumber("ArmAngleRaw", CommandBase.mainArm.getRaw());
|
SmartDashboard.putNumber("ArmAngleRaw", CommandBase.mainArm.getRaw());
|
||||||
SmartDashboard.putNumber("ArmAngleDegrees", CommandBase.mainArm.getDegrees());
|
SmartDashboard.putNumber("ArmAngleDegrees", CommandBase.mainArm.getDegrees());
|
||||||
SmartDashboard.putNumber("tmpRotations", CommandBase.driveBase.getLeftRotations());
|
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"));
|
CommandBase.pneumatics.setCompressorEnabled(SmartDashboard.getBoolean("CompressorEnabled"));
|
||||||
System.out.println(CommandBase.mainArm.getDegrees());
|
System.out.println(CommandBase.mainArm.getDegrees());
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ public class RobotMap {
|
|||||||
//Misc
|
//Misc
|
||||||
public static int mainArmPresetCollect = -5;
|
public static int mainArmPresetCollect = -5;
|
||||||
public static int mainArmPresetTraverse = 10;
|
public static int mainArmPresetTraverse = 10;
|
||||||
|
public static int mainArmPresetLowShot= 30;
|
||||||
public static int mainArmPresetCloseShot = 90;
|
public static int mainArmPresetCloseShot = 90;
|
||||||
public static int mainArmPresetFarShot = 70;
|
public static int mainArmPresetFarShot = 70;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ public class MainArm extends PIDSubsystem {
|
|||||||
private double min = RobotMap.zeroDegrees;
|
private double min = RobotMap.zeroDegrees;
|
||||||
private double max = RobotMap.ninetyDegrees;
|
private double max = RobotMap.ninetyDegrees;
|
||||||
public MainArm() {
|
public MainArm() {
|
||||||
super("MainArm", 0.3, 0.0, 0.4);
|
super("MainArm", 0.07, 0.0, 0.00);
|
||||||
getPIDController().setContinuous(false);
|
getPIDController().setContinuous(false);
|
||||||
setSetpoint(70);
|
setSetpoint(70);
|
||||||
enable();
|
enable();
|
||||||
|
Loading…
Reference in New Issue
Block a user