From ad3d51e51f6b7f3472c2007fb0557f02aefb7472 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Tue, 28 May 2019 12:23:41 -0700 Subject: ubxtool: Improve UBX-CFG-PMS decode. --- ubxtool | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'ubxtool') diff --git a/ubxtool b/ubxtool index 75d734c4..c69f99b7 100755 --- a/ubxtool +++ b/ubxtool @@ -2166,6 +2166,15 @@ class ubx(object): index_s(u[5], self.cfg_odo_profile))) return s + cfg_pms_values = {0: "Full power", + 1: "Balanced", + 2: "Interval", + 3: "Aggresive with 1Hz", + 4: "Aggresive with 2Hz", + 5: "Aggresive with 4Hz", + 0xff: "Invalid" + } + def cfg_pms(self, buf): """UBX-CFG-PMS decode, Power Mode Setup""" @@ -2176,19 +2185,12 @@ class ubx(object): if 8 > m_len: return "Bad Length %s" % m_len - values = {0: "Full power", - 1: "Balanced", - 2: "Interval", - 3: "Aggresive with 1Hz", - 4: "Aggresive with 2Hz", - 5: "Aggresive with 4Hz", - 0xff: "Invalid" - } u = struct.unpack_from('