sparkfun / SparkFun_CAN-Bus_Arduino_Library

Other
154 stars 99 forks source link

How to run at 1Mb/s? #10

Open JunctionRunner opened 5 years ago

JunctionRunner commented 5 years ago

I'm wondering how we can add the 1000kbps setting to the library? I edited Canbus.h to add CANSPEED_1000, however it does not seem to work trying to obtain the rpm from a vehicle. I'm not sure if the numbers 1 3 and 7 are just there to set the "priority" like in networking to set connection priority or if it means something else?

I only have one set of the chips so can't test with a second set to tell if it is in fact initializing the controller at the higher speed or not.

define CANSPEED_125 7 // CAN speed at 125 kbps

define CANSPEED_250 3 // CAN speed at 250 kbps

define CANSPEED_500 1 // CAN speed at 500 kbps

define CANSPEED_1000 0 // CAN speed at 1000 kbps