Skip to content

Commit

Permalink
Testing CAN Bus traffic issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rachitkakkar committed Feb 18, 2025
1 parent 8b28e69 commit 587a774
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ public static class SparkInputs {
}

private static final String LOG_TAG = "Spark";
private static final int CAN_TIMEOUT_MS = 50;
private static final int MAX_ATTEMPTS = 5;
private static final int CAN_TIMEOUT_MS = 2000;
private static final int MAX_ATTEMPTS = 20;
private static final int SPARK_MAX_MEASUREMENT_PERIOD = 16;
private static final int SPARK_FLEX_MEASUREMENT_PERIOD = 32;
private static final int SPARK_MAX_AVERAGE_DEPTH = 2;
Expand Down Expand Up @@ -189,6 +189,7 @@ public Spark(ID id, MotorKind kind, Frequency updateRate) {

// Set CAN timeout
m_spark.setCANTimeout(CAN_TIMEOUT_MS);
m_spark.setCANMaxRetries(MAX_ATTEMPTS);

// Restore defaults
restoreFactoryDefaults();
Expand Down

0 comments on commit 587a774

Please sign in to comment.