From 85f361e9aefd7ccd6a84fe26284eb104be5f2770 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Mon, 27 May 2019 17:11:03 -0700 Subject: ubxtool: Add poll and decode of MON-PATCH --- ubxtool | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'ubxtool') diff --git a/ubxtool b/ubxtool index 6e784f7d..5e7dd10b 100755 --- a/ubxtool +++ b/ubxtool @@ -2629,6 +2629,42 @@ class ubx(object): s += rxbuf_name[i] + "%u %u %u %u %u %u\n" % u return s + mon_patch_act = { + 1: "Active" + } + mon_patch_loc = { + 0: "eFuse", + 2: "ROM", + 4: "BBR", + 6: "File System", + } + + def mon_patch(self, buf): + """UBX-MON-PATCH decode, Output information about installed patches.""" + + m_len = len(buf) + + if 0 == m_len: + return " Poll request" + + if 4 > m_len: + return " Bad Length %s" % m_len + + # first seen in protver 15 + u = struct.unpack_from('