diff options
author | Gary E. Miller <gem@rellim.com> | 2019-03-29 15:46:19 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2019-03-29 15:46:19 -0700 |
commit | 2ebbf7f727f1b06dd632dd1c2849ddb47894d3f5 (patch) | |
tree | 683111081bc7c8ea68c4884427a470614ffedc40 /ubxtool | |
parent | 1c2ab0e5c8307c8711a7c05a70e715efdf3f456d (diff) | |
download | gpsd-2ebbf7f727f1b06dd632dd1c2849ddb47894d3f5.tar.gz |
ubxtool: Decode transaction byte in UBX-CFG-VALxxx
Diffstat (limited to 'ubxtool')
-rwxr-xr-x | ubxtool | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -572,6 +572,21 @@ class ubx(object): return s.strip() + def _transaction(byte): + """Decode transaction byte""" + if 0 == byte: + s = "Transactionless" + elif 1 == byte: + s = "(Re)start Transaction" + elif 2 == byte: + s = "Continue Transaction" + elif 3 == byte: + s = "Apply and end Transaction" + else: + s = "Unkown" + + return s + def cfg_valdel(self, buf): """"UBX-CFG-VALDEL decode, Delete configuration items""" m_len = len(buf) @@ -580,8 +595,8 @@ class ubx(object): return "Bad Length %s" % m_len u = struct.unpack_from('<BBBB', buf, 0) - s = ' version: %u layer: %#x reserved: %u,%u\n' % u - s += ' layers: %s\n' % _layers(u[1]) + s = ' version: %u layer: %#x transaction %#x reserved: %u\n' % u + s += ' layers: %s, %s\n' % (_layers(u[1]), _transaction(u[2])) return s def cfg_valget(self, buf): @@ -606,8 +621,8 @@ class ubx(object): return "Bad Length %s" % m_len u = struct.unpack_from('<BBBB', buf, 0) - s = ' version: %u layer: %#x reserved: %u,%u\n' % u - s += ' layers: %s\n' % _layers(u[1]) + s = ' version: %u layer: %#x transaction %#x reserved: %u\n' % u + s += ' layers: %s, %s\n' % (_layers(u[1]), _transaction(u[2])) return s cfg_ids = {0: {'str': 'PRT', 'dec': cfg_prt, 'name': 'UBX-CFG-PRT'}, |