diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-07-07 16:57:39 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-07-07 16:57:39 +0200 |
commit | d79a80e8bed19ebbff333c244c3c90bae39c9181 (patch) | |
tree | a63ad7eb8e7c22704a07d2d3bfb75bed57520bc6 /mavlink/share/pyshared/pymavlink/examples/mavtest.py | |
parent | 68dbf0057a3a80713f79a10669128b7bc9b5cebb (diff) | |
download | px4-firmware-d79a80e8bed19ebbff333c244c3c90bae39c9181.tar.gz px4-firmware-d79a80e8bed19ebbff333c244c3c90bae39c9181.tar.bz2 px4-firmware-d79a80e8bed19ebbff333c244c3c90bae39c9181.zip |
really remove mavlink folder
Diffstat (limited to 'mavlink/share/pyshared/pymavlink/examples/mavtest.py')
-rw-r--r-- | mavlink/share/pyshared/pymavlink/examples/mavtest.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/mavlink/share/pyshared/pymavlink/examples/mavtest.py b/mavlink/share/pyshared/pymavlink/examples/mavtest.py deleted file mode 100644 index 3c385e48a..000000000 --- a/mavlink/share/pyshared/pymavlink/examples/mavtest.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python - -import sys, os - -# allow import from the parent directory, where mavlink.py is -sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')) - -import mavlink - -class fifo(object): - def __init__(self): - self.buf = [] - def write(self, data): - self.buf += data - return len(data) - def read(self): - return self.buf.pop(0) - -f = fifo() - -# create a mavlink instance, which will do IO on file object 'f' -mav = mavlink.MAVLink(f) - -# set the WP_RADIUS parameter on the MAV at the end of the link -mav.param_set_send(7, 1, "WP_RADIUS", 101) - -# alternatively, produce a MAVLink_param_set object -# this can be sent via your own transport if you like -m = mav.param_set_encode(7, 1, "WP_RADIUS", 101) - -# get the encoded message as a buffer -b = m.get_msgbuf() - -# decode an incoming message -m2 = mav.decode(b) - -# show what fields it has -print("Got a message with id %u and fields %s" % (m2.get_msgId(), m2.get_fieldnames())) - -# print out the fields -print(m2) |