DeepBlueRobotics / lib199

Code that we reuse in different projects/years.
Other
2 stars 0 forks source link

Temperature checking is occasionally reporting bogus temperatures and disabling motors. #37

Closed brettle closed 1 year ago

brettle commented 1 year ago

For now, just comment this line out:

https://github.com/DeepBlueRobotics/lib199/blob/ec05757170d1275e0b4d180db16609bde65fd34b/src/main/java/org/carlmontrobotics/lib199/MotorControllerFactory.java#L100

I've tried to reproduce the problem by checking if the temp is too high from within RobotCode2023's Arm.java but haven't succeeded. However, not calling reportSparkMaxTemp() definitely makes the problem go away.

brettle commented 1 year ago

Specifically, I'm seeing:

Port 17 spark max is operating at 188.0 degrees Celsius! It will be disabled until the robot code is restarted.

but the value displayed on SmartDashboard seems to be consistently at 24. So I suspect the reported temperature spike only happens occasionally for some reason. Notably, the report high temp occurs shortly after:

Whoops, big oopsie : fault error(s) with spark max id : 17: [ ], ooF!
Bruh, you did an Error : sticky fault(s) error with spark max id : 17: kIWDTReset kEEPROMCRC kCANRX kHasReset kSoftLimitRev , Ouch!

I suspect the sticky faults are unrelated, but it's getting some sort of fault.