SwerveDriveSpecialties / Do-not-use-swerve-lib-2022-unmaintained

32 stars 77 forks source link

CAN FD support #13

Open WOFsoftware51 opened 2 years ago

WOFsoftware51 commented 2 years ago

The way the Falcon and CANcoder libraries are currently implemented, there isn't an easy way to change what CAN network they utilize. Considering 8 falcons and 4 CANcoders already is pretty high CAN bus utilization on the RIO, I am sure more people will be utilizing CAN FD CANivores.

randomstring commented 2 years ago

+1 for CANivore support.

democat3457 commented 2 years ago

implemented on my fork (for Mk4 only, for now): https://www.chiefdelphi.com/t/official-sds-mk3-mk4-code/397109/101?u=democat

you can specify the canbus as a String parameter to the Helper, or you can try out the new Builder class

randomstring commented 2 years ago

I didn't dig around enough to understand why the configuration objects didn't inherit from a base configuration class and why all the factories use decorators (pulling data from the configuration class) instead of just passing the configuration objects down to each factory. I think this could simplify the code. Instead of having multiple constructors for each motor class, just pass in a single configuration object.