summaryrefslogtreecommitdiff
path: root/ubxtool
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-10-02 19:39:03 -0700
committerGary E. Miller <gem@rellim.com>2018-10-02 19:39:03 -0700
commit3f439e45262c6c71e77fcf4f50deb1cedb6393c8 (patch)
treea5bd1f396a2df8ec5afb52742eab3d3f57ce8b2a /ubxtool
parenta31261d55b850fd425c2cfb091b91dd2088c30d2 (diff)
downloadgpsd-3f439e45262c6c71e77fcf4f50deb1cedb6393c8.tar.gz
ubxtool: Fix UBX-MON-VER for Python 3.
Diffstat (limited to 'ubxtool')
-rwxr-xr-xubxtool12
1 files changed, 6 insertions, 6 deletions
diff --git a/ubxtool b/ubxtool
index 40f93fb7..7c6c7ec9 100755
--- a/ubxtool
+++ b/ubxtool
@@ -538,19 +538,19 @@ class ubx(object):
if 40 > m_len:
return " Bad Length %s" % m_len
- substr = buf.split('\0')[0]
- s = ' swVersion: %s\n' % (substr)
+ substr = buf.split(gps.polybytes('\0'))[0]
+ s = ' swVersion: %s\n' % gps.polystr(substr)
substr = buf[30:39]
- substr = substr.split('\0')[0]
- s += ' hwVersion: %s' % (substr[30:39])
+ substr = substr.split(gps.polybytes('\0'))[0]
+ s += ' hwVersion: %s' % gps.polystr(substr[30:39])
# extensions??
num_ext = int((m_len - 40) / 30)
i = 0
while i < num_ext:
loc = 40 + (i * 30)
substr = buf[loc:]
- substr = substr.split('\0')[0]
- s += '\n extension: %s' % (substr)
+ substr = substr.split(gps.polybytes('\0'))[0]
+ s += '\n extension: %s' % gps.polystr(substr)
i += 1
return s