Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

radio.isAckPayloadAvailable() not working #30

Open
HoracioDos opened this issue Oct 17, 2016 · 3 comments
Open

radio.isAckPayloadAvailable() not working #30

HoracioDos opened this issue Oct 17, 2016 · 3 comments

Comments

@HoracioDos
Copy link

radio.isAckPayloadAvailable() always returns false when sending a message with dynamic payload size
Sender code.

radio.write(message)
if radio.isAckPayloadAvailable():
   ack = []
   radio.read(ack)
   print ack

Receiver code

recv_buffer = []
radio.read(recv_buffer)
ack_buffer = [1]
radio.writeAckPayload(1,ack_buffer, len(ack_buffer))
@MilesBDyson
Copy link

i am having this issue as well, i have been trying to get the ackpayload to work with zero results, has any one figured out a work around, dynamicpaylod on or off it seams i can not get it working.

@lafila93
Copy link

I did some testing myself and got it to work in the end.
isAckPayloadAvailable() seems to return False even though available() does return True when exspecting an Ack Payload. So I'd recommend just using available() for now.
Mentionworthy remark that did cost me some time to debug: do not call startListening() after writing if you want to read the Ack Payload - this functions clears the buffer and the Ack Payload gets lost.
Dynamic and Ack Payload works very well together on my side.

@MilesBDyson
Copy link

thank you this worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants