Closed jbirmingham40 closed 2 years ago
Something else is going on. It seems that I have to send in an array of 64 bytes in order to get the correct results. I worked around the issue. You can close this.
prepending the size before sending the array
That is intentional, and is how RF69 operates in variable packet length mode (which is the default).
However, there was indeed a bug in the logic resolving the number of actually received bytes vs. the number of bytes user wants to read. It should be fixed now, thanks for reporting.
I tested out your RF69_Receive and RF69_Transmit examples using the commented out code for sending byte arrays. The byte array returned does not match the one sent. After some debugging it appears that you are prepending the size before sending the array and not removing it before returning the array. If I skip the first element of the array I get what I expect however this is probably not what you intended.