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

Set sequence number in msg_heartbeat, which is sent to drone #956

Merged
merged 6 commits into from
Aug 23, 2014
Merged

Set sequence number in msg_heartbeat, which is sent to drone #956

merged 6 commits into from
Aug 23, 2014

Conversation

snorkel123
Copy link
Member

Closes #578

@PaulLoizeaux
Copy link

@alextel69 This is only being set in msg_heartbeat as you said. Shouldn't the correct sequence number be set in every message that is sent?

@snorkel123
Copy link
Member Author

@PaulLoizeaux thanks for your note, I really forgot to fix other messages. Do all packets need to have same seq number or they may have individual ones?

@PaulLoizeaux
Copy link

@alextel69 I think the sequence number of each packet should be sequential regardless of what type of message it is. It is a way to tell if it lost any packets in transit I think.

The problem I think we have at that point is that we need to find every place that sends a MAVLink message so we can implement a sequence number in them.

@arthurbenemann
Copy link
Member

Or just maintain the sequence state on the mavconnection class, and
overwrite the seq field in the packets as required.
On Aug 19, 2014 5:29 PM, "Paul Loizeaux" [email protected] wrote:

@alextel69 https://github.com/alextel69 I think the sequence number of
each packet should be sequential regardless of what type of message it is.
It is a way to tell if it lost any packets in transit I think.

The problem I think we have at that point is that we need to find every
place that sends a MAVLink message so we can implement a sequence number in
them.


Reply to this email directly or view it on GitHub
#956 (comment)
.

@snorkel123
Copy link
Member Author

@arthurbenemann every sent packet should have i+1 seq number?

@arthurbenemann
Copy link
Member

@alextel69 yes, warping around at 255. The best place to do it is probably here, right before encoding the packet into a byte array

@arthurbenemann
Copy link
Member

@alextel69 Ready for a merge?

@snorkel123
Copy link
Member Author

@arthurbenemann could you take a look at last commit - I am unsure whether I understood "rolling" correctly.
If it is ok, than ready for merge

@arthurbenemann
Copy link
Member

Looks correct. The correct term is integer overflow

@snorkel123
Copy link
Member Author

Glad to hear it from you!
It also modifies .gitignore, just be aware of it.

@arthurbenemann
Copy link
Member

@alextel69 Don't worry, I try to review every line that is merged :)

arthurbenemann added a commit that referenced this pull request Aug 23, 2014
…umber

Set sequence number in msg_heartbeat, which is sent to drone
@arthurbenemann arthurbenemann merged commit eea7d0e into DroidPlanner:master Aug 23, 2014
@snorkel123 snorkel123 deleted the fix-mavlink-message-sequence-number branch August 25, 2014 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants