From 4e2b525dcc337fface0caba0b83f620e5311d664 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Mon, 27 May 2019 19:47:10 -0700 Subject: ubxtool: Add poll and decode of UBX-CFG-ODO. --- ubxtool | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'ubxtool') diff --git a/ubxtool b/ubxtool index dff5ab79..ad7e6dc0 100755 --- a/ubxtool +++ b/ubxtool @@ -2112,6 +2112,41 @@ class ubx(object): index_s(u[7], self.cfg_nmea_gtid))) return s + cfg_odo_flags = { + 1: "useODO", + 2: "useCOG", + 4: "useLPVel", + 8: "useLPCog", + } + + cfg_odo_profile = { + 0: "Running", + 1: "Cycling", + 2: "Swimming", + 3: "Car", + 4: "Custom", + } + + def cfg_odo(self, buf): + """UBX-CFG-ODO decode, Odometer, Low-speed COG Engine Settings""" + m_len = len(buf) + if 0 == m_len: + return " Poll request" + + if 20 > m_len: + return "Bad Length %s" % m_len + + u = struct.unpack_from('