astuff / kvaser_interface

A Kvaser CAN interface ROS abstraction layer.
MIT License
84 stars 52 forks source link

Fix static function callback woes #51

Closed JWhitleyWork closed 4 years ago

JWhitleyWork commented 4 years ago

See #50 for context and explanation. Now calling canSetNotify() from the Canlib API with an instance of the current KvaserCan object cast to a void* as the tag argument. This then gets returned to the callback proxy function as the tag field of a canNotifyData struct. This is then cast back to a KvaserCan object in order to call the user-defined read callback.

Do not merge until tested on a sensor and a vehicle.