summaryrefslogtreecommitdiff
path: root/ubxtool
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2019-05-28 12:53:34 -0700
committerGary E. Miller <gem@rellim.com>2019-05-28 12:53:34 -0700
commit87a01af6fd67680cb7ee8f7bb635e68a5a4f48ad (patch)
treefe4a8566cc2a640c75bc0956cef9bd931688b739 /ubxtool
parent998279d72591027f0a203081f9d6a4f04b89547f (diff)
downloadgpsd-87a01af6fd67680cb7ee8f7bb635e68a5a4f48ad.tar.gz
ubxtool: Improve UBX-RCM-RAWX decode.
Diffstat (limited to 'ubxtool')
-rwxr-xr-xubxtool13
1 files changed, 7 insertions, 6 deletions
diff --git a/ubxtool b/ubxtool
index e6aa983e..706ab7f0 100755
--- a/ubxtool
+++ b/ubxtool
@@ -3677,6 +3677,11 @@ class ubx(object):
return s
+ rxm_rawx_recs = {
+ 1: "leapSec",
+ 2: "clkReset",
+ }
+
def rxm_rawx(self, buf):
"""UBX-RXM-RAWX decode"""
m_len = len(buf)
@@ -3690,12 +3695,8 @@ class ubx(object):
u = struct.unpack_from('<dHbBBBBB', buf, 0)
s = (' rcvTow %.3f week %u leapS %d numMeas %u recStat %#x'
' version %u\n'
- ' reserved1[2] %#x %#x\n recStat: ' % u)
- if 0x3 & u[4]:
- if 1 & u[4]:
- s += 'leapSec '
- if 2 & u[4]:
- s += 'clkReset '
+ ' reserved1[2] %#x %#x\n recStat (' % u)
+ s += flag_s(u[4], self.rxm_rawx_recs) + ')'
m_len -= 16
i = 0