From feb53de30a3c22da34d3d59be8d615c8acb9fc51 Mon Sep 17 00:00:00 2001 From: thenetworkgrinch Date: Wed, 20 Dec 2023 09:50:47 -0600 Subject: [PATCH] Removed asynchronous CAN messages to SparkMAX's Signed-off-by: thenetworkgrinch --- .../java/swervelib/motors/SparkMaxBrushedMotorSwerve.java | 4 ++-- src/main/java/swervelib/motors/SparkMaxSwerve.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/swervelib/motors/SparkMaxBrushedMotorSwerve.java b/src/main/java/swervelib/motors/SparkMaxBrushedMotorSwerve.java index bab87194..ba1add7a 100644 --- a/src/main/java/swervelib/motors/SparkMaxBrushedMotorSwerve.java +++ b/src/main/java/swervelib/motors/SparkMaxBrushedMotorSwerve.java @@ -88,8 +88,8 @@ public SparkMaxBrushedMotorSwerve(CANSparkMax motor, boolean isDriveMotor, Type // Configure feedback of the PID controller as the integrated encoder. configureSparkMax(() -> pid.setFeedbackDevice(encoder)); } - - configureSparkMax(() -> motor.setCANTimeout(0)); // Spin off configurations in a different thread. + // Spin off configurations in a different thread. + // configureSparkMax(() -> motor.setCANTimeout(0)); // Commented it out because it prevents feedback. } /** diff --git a/src/main/java/swervelib/motors/SparkMaxSwerve.java b/src/main/java/swervelib/motors/SparkMaxSwerve.java index 7d97cae9..7ec5c2b8 100644 --- a/src/main/java/swervelib/motors/SparkMaxSwerve.java +++ b/src/main/java/swervelib/motors/SparkMaxSwerve.java @@ -62,7 +62,7 @@ public SparkMaxSwerve(CANSparkMax motor, boolean isDriveMotor) encoder); // Configure feedback of the PID controller as the integrated encoder. // Spin off configurations in a different thread. - configureSparkMax(() -> motor.setCANTimeout(0)); + // configureSparkMax(() -> motor.setCANTimeout(0)); // Commented out because it prevents feedback. } /**