This is most likely directed to @bigjosh (or, at least, I know you know the answer, for some reason ).
In the context of guaranteed datagram delivery, I am experimenting with direct datagram sending/receiving in a way that hopefully would allow several packets to be exchanged in a single loop pass.
Looking ta the blinklib code, sending a datagram is trivial and it LOOKS like it would be sent right away (modulo a collision happening). I can not be sure as the actual code that does that is in BlinkBIOS, which is closed source, but I am assuming this is true (please correct me if I am wrong).
For the receiving end, it does not look like things are that straight forward and I am guessing it either involves some kind of background thread doing the receive (that would set the ir_rx_state stuff) or it is not a thread (or interrupt-based code) but is something done by BlinkBIOS synchronously which would mean it most likely woudl only happen between loop iterations.
So, my question is:
1 - Without changes to BlinkBIOS, is this doable?
2 - What would be the implications? Possible higher battery usage? I assume IR transfers are almost instantaneous in any case, correct?
3 - Do I need to call something to explicitly get the ir_rx_state stuff updated?
Note I do not want to generally bypass the normal datagram stuff but guaranteed delivery requires a 3 -way handshake and if I could do that in a single loop iteration (send/receive/send from the seding side and receive/send/receive from the receiving side), it would both simplify my code a lot (currently it is over 400 lines of code just to do that) and also make guaranteed delivery datagrams performance be on-par with the existing datagram delivery system (actually, maybe even faster due to not having the need to wait for the data sending/receiving timers).
Thanks in advance.