Skip to content

Commit bd403e3

Browse files
kylecorry31NicholasBottone
authored andcommitted
Add potentiometer values
1 parent 60d479e commit bd403e3

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/main/java/frc/robot/RobotMap.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,6 @@ public class RobotMap {
3838

3939
public static final int hatchPotentiometer = 1;
4040

41+
public static final int POTENTIOMETER_RANGE_DEGREES = 3600;
42+
4143
}

src/main/java/frc/robot/subsystems/CargoManipulator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class CargoManipulator extends PIDSubsystem implements IPiston {
2525
public static final double MAXIMUM_SPEED = 0.9;
2626
public static final double INTAKE_SPEED = 0.7; // TODO: Test to find ideal intake speed value.
2727
public static final double RESTING_ANGLE = 0;
28+
public static final double MAXIMUM_ANGLE = 11; // TODO: This is inaccurate, and is probably greater than 11 degrees in reality
2829

2930
public double shootingSpeed = DEFAULT_SPEED;
3031

@@ -57,7 +58,7 @@ public CargoManipulator() {
5758
cargoPiston = new Piston(new FRCSolenoid(0, RobotMap.cargoPiston));
5859

5960
cargoLimitSwitch = new LimitSwitch(RobotMap.cargoLimitSwitch);
60-
cargoPotentiometer = new AnalogPotentiometer(RobotMap.cargoPotentiometer);
61+
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
6162

6263
cargoSpeedControllerWrist = new GTalonSRX(RobotMap.cargoWristMotor);
6364
cargoSpeedControllerWrist.setInverted(false);
@@ -73,7 +74,7 @@ public CargoManipulator() {
7374
*/
7475
@Override
7576
public void initDefaultCommand() {
76-
// setDefaultCommand(new ResetCargoManipulator()); TODO
77+
// setDefaultCommand(new ResetCargoManipulator()); TODO enable this during testing
7778
}
7879

7980
/**

src/main/java/frc/robot/subsystems/HatchManipulator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class HatchManipulator extends PIDSubsystem implements IPiston {
1919

2020
public static final double DEFAULT_SPEED = 0.1;
2121
public static final double TOP_ANGLE = 0;
22-
public static final double BOTTOM_ANGLE = 90; // TODO: Find this
22+
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
2323
public static final double TOLERANCE = 10;
2424

2525
private IPiston hatchPiston;
@@ -38,7 +38,7 @@ public HatchManipulator() {
3838
hatchSpeedController.setInverted(false);
3939
hatchSpeedController.useBrakeMode();
4040

41-
hatchPotentiometer = new AnalogPotentiometer(RobotMap.hatchPotentiometer, 360*10, 0);
41+
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
4242

4343
}
4444

@@ -55,7 +55,7 @@ public HatchManipulator(IPiston piston, ITalonSRX talon, Potentiometer potentiom
5555
@Override
5656
public void initDefaultCommand() {
5757
// Set the default command for a subsystem here.
58-
// setDefaultCommand(new ResetHatchManipulator()); TODO
58+
// setDefaultCommand(new ResetHatchManipulator()); TODO enable this when testing
5959
}
6060

6161
@Override

0 commit comments

Comments
 (0)