diff --git a/python/sbp/__init__.py b/python/sbp/__init__.py old mode 100755 new mode 100644 diff --git a/python/sbp/acquisition.py b/python/sbp/acquisition.py old mode 100755 new mode 100644 diff --git a/python/sbp/bootload.py b/python/sbp/bootload.py old mode 100755 new mode 100644 diff --git a/python/sbp/logging.py b/python/sbp/logging.py old mode 100755 new mode 100644 diff --git a/python/sbp/msg.py b/python/sbp/msg.py old mode 100755 new mode 100644 diff --git a/python/sbp/navigation.py b/python/sbp/navigation.py old mode 100755 new mode 100644 diff --git a/python/sbp/piksi.py b/python/sbp/piksi.py old mode 100755 new mode 100644 diff --git a/python/sbp/sbp2json.py b/python/sbp/sbp2json.py index 5d4b0b9abe..d564fa857e 100644 --- a/python/sbp/sbp2json.py +++ b/python/sbp/sbp2json.py @@ -39,6 +39,8 @@ def base_cl_options(): help="the JSON serialization library to use, default: {}".format(DEFAULT_JSON)) parser.add_argument('--include', nargs="+", type=int, default=[], help="list of SBP message IDs to include, empty means all") + parser.add_argument("--unbuffered", action="store_true", + help="disable buffering when reading data from input (slower)") parser.add_argument('file', nargs='?', metavar='FILE', type=argparse.FileType('rb'), default=sys.stdin, help="the input file, stdin by default") @@ -61,6 +63,13 @@ def get_args(): return args +# return the read and expected CRCs from 'buf' +def get_crcs(buf, payload_len): + crc_read, = struct.unpack("