Skip to content

Commit

Permalink
Removed asynchronous CAN messages to SparkMAX's
Browse files Browse the repository at this point in the history
Signed-off-by: thenetworkgrinch <thenetworkgrinch@users.noreply.github.com>
  • Loading branch information
thenetworkgrinch committed Dec 20, 2023
1 parent d12ea36 commit feb53de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/swervelib/motors/SparkMaxSwerve.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

/**
Expand Down

0 comments on commit feb53de

Please sign in to comment.