Skip to content

Relaxation time crtp radio driver not functional #481

Description

@knmcguire

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions