New to mavlink -- python decode() failing on Rasp Pi B+ but not on OSX

252 views
Skip to first unread message

a7sce...@gmail.com

unread,
Jan 12, 2015, 12:18:11 PM1/12/15
to mav...@googlegroups.com
First post here...  I've noticed some strange behavior with the pymavlink decode() function on my Raspberry Pi B+ and I'm wondering if it's something obvious.  I'm running the example python code for encoding and then decoding a mavlink message (code is here:  http://nullege.com/codes/show/src%40m%40a%40mavlink-HEAD%40pymavlink%40examples%40mavtest.py/27/pymavlink.mavlinkv10.MAVLink.param_set_encode/python) on my Raspberry Pi B+ running Raspian.  As-is, the code fails on the mavlink decode function with error:  

    crcbuf.append(crc_extra)

     AttributeError: 'str' object has no attribute 'append' 


I went into mavlink.py and disabled the extra CRC section in the decode() function and the code runs fine.  


                #crcbuf = msgbuf[1:-2]

                #if True: # using CRC extra 

                    #crcbuf.append(crc_extra)

                #crc2 = x25crc(crcbuf)

                #if crc != crc2.crc:

                #    raise MAVError('invalid MAVLink CRC in msgID %u 0x%04x should be 0x%04x' % (msgId, crc, crc2.crc))

         

Strangely, on both my OSX machine and an older Pi, the example encode/decode python code runs fine without having to edit mavlink.py.  Any thoughts? 

Reply all
Reply to author
Forward
0 new messages