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

Python pprz msg #1261

Merged
merged 4 commits into from
Jul 27, 2015
Merged

Python pprz msg #1261

merged 4 commits into from
Jul 27, 2015

Conversation

gautierhattenberger
Copy link
Member

Add some utilities and a serial link interface to decode/encode PPRZ messages over a serial link in Python

data = msg.payload_to_binary()
# STX + length + sender_id + msg_id + data + ck_a + ck_b
length = 6 + len(data)
msg = struct.pack("=BBBB", STX, length, sender, msg.msg_id) + data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not not use native byte order, but rather set a fixed byte order: < for little endian in our case

@flixr flixr merged commit 5f83f01 into paparazzi:master Jul 27, 2015
flixr added a commit that referenced this pull request Jul 27, 2015
Add some utilities and a serial link interface to decode/encode PPRZ messages over a serial link in Python

merges #1261
@flixr flixr added this to the v5.6 milestone Jul 27, 2015
@gautierhattenberger gautierhattenberger deleted the python_pprz_msg branch July 28, 2015 19:36
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.

None yet

2 participants