Skip to content

Commit 6624c57

Browse files
switch the parks max run into can wire issue
1 parent d59e8c8 commit 6624c57

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/main/java/org/carlmontrobotics/Constants.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,7 @@ public static final class Drivetrainc {
241241
// kP, kI, and kD constants for turn motor controllers in the order of
242242
// front-left, front-right, back-left, back-right.
243243
// Determine correct turn PID constants
244-
public static final double[] turnkP = { 51.078, 60.885, 60.946, 60.986 }; // {0.00374, 0.00374, 0.00374,
245-
// 0.00374};
244+
public static final double[] turnkP = { 0.00374, 0.00374, 0.00374, 0.00374 };
246245
public static final double[] turnkI = { 0, 0, 0, 0 };
247246
public static final double[] turnkD = { 0/* dont edit */, 0.5, 0.42, .5 }; // todo: use d
248247
// public static final double[] turnkS = {0.2, 0.2, 0.2, 0.2};
@@ -305,15 +304,15 @@ public static final class Drivetrainc {
305304

306305
// #region Ports
307306

308-
public static final int driveFrontLeftPort = CONFIG.isSwimShady() ? 8 : 11; //
309-
public static final int driveFrontRightPort = CONFIG.isSwimShady() ? 13 : 19; //
310-
public static final int driveBackLeftPort = CONFIG.isSwimShady() ? 5 : 14; //
311-
public static final int driveBackRightPort = CONFIG.isSwimShady() ? 11 : 17; // correct
307+
public static final int driveFrontLeftPort = CONFIG.isSwimShady() ? 1 : 11; //
308+
public static final int driveFrontRightPort = CONFIG.isSwimShady() ? 2 : 19; //
309+
public static final int driveBackLeftPort = CONFIG.isSwimShady() ? 3 : 14; //
310+
public static final int driveBackRightPort = CONFIG.isSwimShady() ? 4 : 17; // correct
312311

313-
public static final int turnFrontLeftPort = CONFIG.isSwimShady() ? 7 : 12; //
314-
public static final int turnFrontRightPort = CONFIG.isSwimShady() ? 14 : 20; // 20
315-
public static final int turnBackLeftPort = CONFIG.isSwimShady() ? 6 : 15; //
316-
public static final int turnBackRightPort = CONFIG.isSwimShady() ? 12 : 16; // correct
312+
public static final int turnFrontLeftPort = CONFIG.isSwimShady() ? 11 : 12; //
313+
public static final int turnFrontRightPort = CONFIG.isSwimShady() ? 12 : 20; // 20
314+
public static final int turnBackLeftPort = CONFIG.isSwimShady() ? 13 : 15; //
315+
public static final int turnBackRightPort = CONFIG.isSwimShady() ? 14 : 16; // correct
317316

318317
public static final int canCoderPortFL = CONFIG.isSwimShady() ? 4 : 0;
319318
public static final int canCoderPortFR = CONFIG.isSwimShady() ? 2 : 3;

src/main/java/org/carlmontrobotics/subsystems/Drivetrain.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public Drivetrain() {
108108
// SmartDashboard.putNumber("set x", 0);
109109
// SmartDashboard.putNumber("set y", 0);
110110
// Calibrate Gyro
111+
111112
{
112113

113114
double initTimestamp = Timer.getFPGATimestamp();
@@ -208,7 +209,7 @@ public Drivetrain() {
208209
}
209210

210211
SmartDashboard.putData("Field", field);
211-
212+
turnMotors[3].set(0.2);
212213
// for(CANSparkMax driveMotor : driveMotors)
213214
// driveMotor.setSmartCurrentLimit(80);
214215

@@ -231,6 +232,7 @@ public Drivetrain() {
231232

232233
@Override
233234
public void simulationPeriodic() {
235+
System.out.print("Mooooooooonkey" + turnMotors[3].getOutputCurrent());
234236
for (var moduleSim : moduleSims) {
235237
moduleSim.update();
236238
}

0 commit comments

Comments
 (0)