bluerobotics / ping-firmware

Repository for binary files associated with ping devices
5 stars 8 forks source link

Support device ID filtering #32

Open ES-Alexander opened 3 months ago

ES-Alexander commented 3 months ago

The message format includes fields for receiver and sender IDs, but using them is documented as "not currently implemented", and they just get hardcoded to 0.

This is a valuable feature for people wanting to communicate with multiple devices on the same bus, as raised in this forum thread.

This seems conceptually straightforward to implement, with a msg.dst_device_id in (0, 255, self.device_id) check in the receiving code, and including the sender ID if there is one set, although full support would require also updating Ping Viewer and the various ping libraries to make use of the feature.