Skip to content

Commit 325297b

Browse files
committed
document kOverheatTripCount + 1
1 parent 47e4d79 commit 325297b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/java/org/carlmontrobotics/lib199/MotorErrors.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ public static void doReportSparkMaxTemp() {
131131
// Check if temperature exceeds the setpoint or if the contoller has already overheated to prevent other code from resetting the current limit after the controller has cooled
132132
if(numTrips >= kOverheatTripCount) {
133133
if(numTrips < kOverheatTripCount + 1) {
134+
// Set trip count to kOverheatTripCount + 1 to flag that an error message has already been printed
135+
// This prevents the error message from being re-printed every time the periodic method is run
134136
overheatedSparks.put(port, kOverheatTripCount + 1);
135137
System.err.println("Port " + port + " spark max is operating at " + temp + " degrees Celsius! It will be disabled until the robot code is restarted.");
136138
}

0 commit comments

Comments
 (0)