hubo / hubo-ach

Low level controller for the Hubo 2 and Hubo 2+ platforms designed by Daniel M. Lofaro. The system is based on the IPC called ACH by Neil Dantam and Mike Stilman.
Other
5 stars 18 forks source link

Dropped CAN Frames #60

Open ndantam opened 10 years ago

ndantam commented 10 years ago

sendCan() ignores return values of write(). This needs to be checked for errors.

Checking the return value of write() indicates a large number of CAN frames are dropped.

What is the correct error handling here?

This issue can probably be helped by using select/poll to only write a CAN frames when the kernel has space to buffer it. However, if we're actually trying to run at a higher rate than bus bandwidth permits, that will be a problem.