mavlink_parser.py - Simon's homebrew code for parsing MAVLink messages.
DOES NOT VERIFY CHECKSUM!!!
Based on http://en.wikipedia.org/wiki/MAVLink, but hoping to replace it
with pymavlink, so we can get checksum and other features.
Copyright (C) 2014 Simon D. Levy
This code is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this code. If not, see <http://www.gnu.org/licenses/>.
|STATE_CKA = 7
STATE_CKB = 8
STATE_COMP = 5
STATE_DFLT = 0
STATE_LEN = 2
STATE_MSG = 6
STATE_SEQ = 3
STATE_STX = 1
STATE_SYS = 4
STX_BYTE = 254