File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/main/java/frc/trigon/robot/subsystems Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ private static void configureArmMasterMotor() {
144
144
145
145
config .Slot0 .kP = RobotHardwareStats .isSimulation () ? 100 : 0 ;
146
146
config .Slot0 .kI = RobotHardwareStats .isSimulation () ? 0 : 0 ;
147
- config .Slot0 .kD = RobotHardwareStats .isSimulation () ? 0 : 0 ;
147
+ config .Slot0 .kD = RobotHardwareStats .isSimulation () ? 1 : 0 ;
148
148
config .Slot0 .kS = RobotHardwareStats .isSimulation () ? 0.026331 : 0 ;
149
149
config .Slot0 .kV = RobotHardwareStats .isSimulation () ? 4.8752 : 0 ;
150
150
config .Slot0 .kA = RobotHardwareStats .isSimulation () ? 0.17848 : 0 ;
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ void setTargetState(ElevatorConstants.ElevatorState targetState) {
98
98
}
99
99
100
100
void setTargetPositionRotations (double targetPositionRotations ) {
101
- double minimumSafeHeightMeters = RobotContainer .ARM .isArmAboveSafeZone () ? 0 : Math .cos (RobotContainer .ARM .getAngle ().getDegrees ()) * ArmConstants .ARM_LENGTH_METERS + ElevatorConstants .MINIMUM_ELEVATOR_SAFE_ZONE_METERS ;
101
+ double minimumSafeHeightMeters = RobotContainer .ARM .isArmAboveSafeZone () ? 0 : Math .cos (RobotContainer .ARM .getAngle ().getRadians ()) * ArmConstants .ARM_LENGTH_METERS + ElevatorConstants .MINIMUM_ELEVATOR_SAFE_ZONE_METERS ;
102
102
double minimumSafeHeightRotations = metersToRotations (minimumSafeHeightMeters );
103
103
masterMotor .setControl (positionRequest .withPosition (Math .max (targetPositionRotations , minimumSafeHeightRotations )));
104
104
}
You can’t perform that action at this time.
0 commit comments