DeepBlueRobotics / lib199

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

Possible Unnecessary Code (Check REVLib Changelog) (SparkMax Unplugged Warning) #45

Closed CoolSpy3 closed 1 year ago

CoolSpy3 commented 1 year ago

https://github.com/DeepBlueRobotics/lib199/blob/432cd16685f4d50eafe6f345dd897543401f1cae/src/main/java/org/carlmontrobotics/lib199/MotorControllerFactory.java#L124-L128 I've emailed Rev about the REVLib issue for which this is a workaround. This issue is for discussion of any relevant information, and as a reminder to watch the changelog as a supported solution may be released in the future.

CoolSpy3 commented 1 year ago

As far as I can tell, this has been patched. I tried creating a spark-max with id 99 and setting the speed, and it didn't crash the code. Some pros and cons to keeping this in: Pros

Cons

Please provide thoughts below

brettle commented 1 year ago

This post seems to indicate that RevLib already logs an error if you attempt to communicate with an unplugged SparkMax, so I don't see a good reason to keep the code.

CoolSpy3 commented 1 year ago

Confirmed! I'll start a PR.