After a considerable time, I finally managed to polish all the bits and pieces I have been working on and release it in a usable package. This version will look like the Blinklib you are used to but with a few notable differences:
Differences from the official Blinklib release at the time of publication
- Improved management of deadlines virtually removing collisions (which improves transfer performance).
- Built-in simple but effective guaranteed delivery for datagrams.
- Datagrams can not cause face value starvation.
- Clean up of public API.
- Slightly smaller storage requirements.
Notable API changes
- All 256 possible byte values are available for face values (as opposed to 64 currently).
- sendDatagramOnFace now returns a bool that indicates if the value was scheduled to be sent or not. If it returns false, the caller must try to send again at the next loop() iteration. If it returns true, it is guaranteed that the datagram will be received by the other Blink eventually.
- If a datagram is not consumed when it reaches a Blink and a new datagram is sent, the new datagram will now overwrite the existing one (currently the incoming one is ignored).
- markDatagramOnFace() is still there but it is basically a NOP now.
- BGA_CUSTOM_BLINKLIB define can be used to check for this specific Blinklib.
- None (famous last words).
How to install
Use the same instructions availabe here but use https://github.com/brunoga/blinklib/releases/download/v1.0.0-beta.1/package_bga_blinklib_index.json as the additional Board Manager URL.
Please try it out with your games and let me know if you see any issues. This was mostly created because I wanted some specific things for my game but it might potentially be useful to any games that make heavy use of face values and datagrams in general.
Let me know what you think!