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

blockPacketCount should be incremented when blockNum 3 arrives #17

Open
martinwork opened this issue Jun 12, 2018 · 1 comment
Open

Comments

@martinwork
Copy link

Suppose the first 4 packets arrive OK. While waiting for the 5th packet, packetCount is 4 but blockPacketCount is still zero. If the 5th packet goes missing, the AA code will set packetCount based on the wrong blockPacketCount, expecting the same packet numbers again.

blockPacketCount should be incremented when blockNum 3 arrives, at the same time as blockNum is reset to zero, not set to packetNum when blockNum 0 arrives. This would have been the wrong value anyway when packetNum started at 1 because of the need to match ++packetCount.

@martinwork
Copy link
Author

I have created a PR for this. Please check it out if you have time. I realised I could use the trick of flashing a C++ sample over a MakeCode one to test a modified debug DAL. Every cloud has a silver lining!

While testing I noticed that if the last packet in a batch of 4 goes missing, the process just times out because the app doesn't get a reply - something for the future. I have tested the changes with the app failing to send a random 50% of packets 0 to 2 of a very large project.

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

1 participant