diff --git a/src/main/java/frc/robot/RobotMap.java b/src/main/java/frc/robot/RobotMap.java index 54e734d..bbdef99 100644 --- a/src/main/java/frc/robot/RobotMap.java +++ b/src/main/java/frc/robot/RobotMap.java @@ -38,4 +38,6 @@ public class RobotMap { public static final int hatchPotentiometer = 1; + public static final int POTENTIOMETER_RANGE_DEGREES = 3600; + } diff --git a/src/main/java/frc/robot/subsystems/CargoManipulator.java b/src/main/java/frc/robot/subsystems/CargoManipulator.java index 034d11a..f651a98 100644 --- a/src/main/java/frc/robot/subsystems/CargoManipulator.java +++ b/src/main/java/frc/robot/subsystems/CargoManipulator.java @@ -25,6 +25,7 @@ public class CargoManipulator extends PIDSubsystem implements IPiston { public static final double MAXIMUM_SPEED = 0.9; public static final double INTAKE_SPEED = 0.7; // TODO: Test to find ideal intake speed value. public static final double RESTING_ANGLE = 0; + public static final double MAXIMUM_ANGLE = 11; // TODO: This is inaccurate, and is probably greater than 11 degrees in reality public double shootingSpeed = DEFAULT_SPEED; @@ -57,7 +58,7 @@ public CargoManipulator() { cargoPiston = new Piston(new FRCSolenoid(0, RobotMap.cargoPiston)); cargoLimitSwitch = new LimitSwitch(RobotMap.cargoLimitSwitch); - cargoPotentiometer = new AnalogPotentiometer(RobotMap.cargoPotentiometer); + cargoPotentiometer = new AnalogPotentiometer(RobotMap.cargoPotentiometer, RobotMap.POTENTIOMETER_RANGE_DEGREES, 990); // TODO: the resting angle is somewhere around 990 degrees, but this estimate can be improved in testing cargoSpeedControllerWrist = new GTalonSRX(RobotMap.cargoWristMotor); cargoSpeedControllerWrist.setInverted(false); @@ -73,7 +74,7 @@ public CargoManipulator() { */ @Override public void initDefaultCommand() { - // setDefaultCommand(new ResetCargoManipulator()); TODO + // setDefaultCommand(new ResetCargoManipulator()); TODO enable this during testing } /** diff --git a/src/main/java/frc/robot/subsystems/HatchManipulator.java b/src/main/java/frc/robot/subsystems/HatchManipulator.java index ccafab3..e365b04 100644 --- a/src/main/java/frc/robot/subsystems/HatchManipulator.java +++ b/src/main/java/frc/robot/subsystems/HatchManipulator.java @@ -19,7 +19,7 @@ public class HatchManipulator extends PIDSubsystem implements IPiston { public static final double DEFAULT_SPEED = 0.1; public static final double TOP_ANGLE = 0; - public static final double BOTTOM_ANGLE = 90; // TODO: Find this + public static final double BOTTOM_ANGLE = 112; // TODO: The robot was on the tote for this measurement, we need to test it on the floor though to get an accurate measurement public static final double TOLERANCE = 10; private IPiston hatchPiston; @@ -38,7 +38,7 @@ public HatchManipulator() { hatchSpeedController.setInverted(false); hatchSpeedController.useBrakeMode(); - hatchPotentiometer = new AnalogPotentiometer(RobotMap.hatchPotentiometer, 360*10, 0); + hatchPotentiometer = new AnalogPotentiometer(RobotMap.hatchPotentiometer, RobotMap.POTENTIOMETER_RANGE_DEGREES, 1562); // TODO: the resting angle is somewhere around 1562 degrees, but this estimate can be improved in testing } @@ -55,7 +55,7 @@ public HatchManipulator(IPiston piston, ITalonSRX talon, Potentiometer potentiom @Override public void initDefaultCommand() { // Set the default command for a subsystem here. - // setDefaultCommand(new ResetHatchManipulator()); TODO + // setDefaultCommand(new ResetHatchManipulator()); TODO enable this when testing } @Override