-
Notifications
You must be signed in to change notification settings - Fork 927
Open
Labels
Description
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:
crazyflie-lib-python/cflib/crtp/radiodriver.py
Lines 632 to 646 in 418a681
| # 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 |