Skip to content

Commit 9b4a9db

Browse files
committed
i fixed some and it got worse....
1 parent 7f3b5e8 commit 9b4a9db

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/main/java/frc/robot/subsystems/drive/DriveConstants.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public class DriveConstants {
7878
public static final double driveKd = 0.0;
7979
public static final double driveKs = 0.0;
8080
public static final double driveKv = 0.16;
81-
public static final double driveSimP = 0.05;
81+
public static final double driveSimP = 1.05;
8282
public static final double driveSimD = 0.0;
8383
public static final double driveSimKs = 0.0;
8484
public static final double driveSimKv = 0.0789;
@@ -91,8 +91,11 @@ public class DriveConstants {
9191

9292
// Turn encoder configuration
9393
public static final boolean turnEncoderInverted = true;
94-
public static final double turnEncoderPositionFactor = 2 * Math.PI; // Rotations -> Radians
95-
public static final double turnEncoderVelocityFactor = (2 * Math.PI) / 60.0; // RPM -> Rad/Sec
94+
// need to stay as a ratio
95+
public static final double turnEncoderPositionFactor =
96+
2 * Math.PI / turnMotorReduction; // Rotations -> Radians
97+
public static final double turnEncoderVelocityFactor =
98+
(2 * Math.PI) / 60.0 / turnMotorReduction; // RPM -> Rad/Sec
9699

97100
// Turn PID configuration
98101
public static final double turnKp = 2;
@@ -127,10 +130,10 @@ public class DriveConstants {
127130
// Specify swerve module (for realistic swerve dynamics)
128131
.withSwerveModule(
129132
new SwerveModuleSimulationConfig(
130-
DCMotor.getKrakenX60(1), // Drive motor is a Kraken X60
131-
DCMotor.getFalcon500(1), // Steer motor is a Falcon 500
132-
6.12, // Drive motor gear ratio.
133-
12.8, // Steer motor gear ratio.
133+
DCMotor.getNEO(1), // Drive motor is a NEO
134+
DCMotor.getNEO(1), // Steer motor is a NEO
135+
driveMotorReduction, // Drive motor gear ratio.
136+
turnMotorReduction, // Steer motor gear ratio.
134137
Voltage.ofBaseUnits(0.1, Volts), // Drive friction voltage.
135138
Voltage.ofBaseUnits(0.1, Volts), // Steer friction voltage
136139
Inches.of(2), // Wheel radius

0 commit comments

Comments
 (0)