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

Picture is not transferred correctly when any chunk is received twice #10

Closed
Anty0 opened this issue Feb 10, 2019 · 2 comments
Closed

Comments

@Anty0
Copy link

Anty0 commented Feb 10, 2019

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)

  1. Connect to tello
  2. Take some pictures (10+)
  3. Save pictures
  4. Disconnect from tello
  5. Some pictures might be missing based on interference between drone and your WiFi adapter

Your Environment

  • Go Version used: go version go1.11.5 linux/amd64
  • Tello Package Version or Date: 401f34d
  • Operating System and version: Arch Linux
@SMerrony
Copy link
Owner

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?

@Anty0
Copy link
Author

Anty0 commented Feb 16, 2019

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. :)

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

2 participants