From 9a9b74ab0688f919f9faf29ee788efcf1c9d6f12 Mon Sep 17 00:00:00 2001 From: Mason-Lam <97353903+Mason-Lam@users.noreply.github.com> Date: Sat, 16 Sep 2023 11:26:10 -0700 Subject: [PATCH] Fix Driving Direction --- src/main/java/frc/team3128/Constants.java | 2 +- src/main/java/frc/team3128/common/swerveNeo/SwerveModule.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/team3128/Constants.java b/src/main/java/frc/team3128/Constants.java index e736655..9a02b8b 100644 --- a/src/main/java/frc/team3128/Constants.java +++ b/src/main/java/frc/team3128/Constants.java @@ -234,7 +234,7 @@ public static class SwerveConstants { public static final TrapezoidProfile.Constraints CONSTRAINTS = new TrapezoidProfile.Constraints(maxSpeed, maxAcceleration); /* Motor Inverts */ - public static final boolean driveMotorInvert = false; + public static final boolean driveMotorInvert = true; public static final boolean angleMotorInvert = true; /* Angle Encoder Invert */ diff --git a/src/main/java/frc/team3128/common/swerveNeo/SwerveModule.java b/src/main/java/frc/team3128/common/swerveNeo/SwerveModule.java index 6e3b112..914b4c7 100644 --- a/src/main/java/frc/team3128/common/swerveNeo/SwerveModule.java +++ b/src/main/java/frc/team3128/common/swerveNeo/SwerveModule.java @@ -66,6 +66,7 @@ private void configAngleMotor(){ angleMotor.setInverted(angleMotorInvert); angleMotor.setIdleMode(IdleMode.kCoast); angleMotor.enableContinuousInput(-180, 180, degreesToRotations(1, angleGearRatio)); + angleMotor.setDefaultStatusFrames(); resetToAbsolute(); } @@ -77,6 +78,7 @@ private void configDriveMotor(){ driveMotor.setInverted(driveMotorInvert); driveMotor.setIdleMode(IdleMode.kCoast); driveMotor.setSelectedSensorPosition(0); + driveMotor.setDefaultStatusFrames(); } /**