Closed Anty0 closed 5 years ago
Thanks so much for this report and fix suggestion. Just committed it and will test soon and do a release forthwith.
Would you like to share any of the other comms improvements?
I was thinking about sharing my improvements since I started working on them. Unfortunately I didn't have enough time to do so yet... Once I find some time, I'll recommit them in separate and more clean commits and create pull requests, but feel free to use some obvious changes on your own, in case you find some time faster then me. :)
Expected Behavior
Picture is successfully received even when flying in area with heavy signal interference.
Current Behavior
It is almost impossible to capture picture in locations with high signal interference, due to bug I have discovered and fixed in this commit. (But unfortunately this commit contains also another improvements for communication, so it isn't easy to see, where exactly the fix is.)
Current implementation of picture transfer is counting every received chunk and rejects all chunks when piece already have received 8 chunks. In situation, where any chunk is received twice, there will be some chunks missing in that piece. As result whole image is not saved.
Possible Solution
Move this line in tello.go (on line 347):
tello.fileTemp.pieces[thisChunk.pieceNum].numChunks++
To the inside of
if
body on line 342:if !already {
This causes only properly received chunks to be counted and (so far during my testing) every image to be received.
Steps to Reproduce (for bugs)
Your Environment
go version go1.11.5 linux/amd64