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

Relaxation time crtp radio driver not functional #481

Open
knmcguire opened this issue Oct 3, 2024 · 0 comments
Open

Relaxation time crtp radio driver not functional #481

knmcguire opened this issue Oct 3, 2024 · 0 comments
Labels

Comments

@knmcguire
Copy link
Contributor

Currently in the library for the CRTP radiodriver, there is a piece of code that is very legacy and doesn't do anything at the moments. It's ifstatement is handled when the lenght of the data array is above zero, but even null packets have at least a data size of 1.

It was supposed to do some relaxation with the communication it seems. Also we need to discuss if this is even something even want right now with the crazyradio / CRTP 2 protocol coming up:

# If there is a copter in range, the packet is analysed and the
# next packet to send is prepared
if (len(data) > 0):
inPacket = CRTPPacket(data[0], list(data[1:]))
self._in_queue.put(inPacket)
waitTime = 0
emptyCtr = 0
else:
emptyCtr += 1
if (emptyCtr > 10):
emptyCtr = 10
# Relaxation time if the last 10 packet where empty
waitTime = 0.01
else:
waitTime = 0

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

No branches or pull requests

1 participant