summaryrefslogtreecommitdiff
path: root/ubxtool
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2019-05-25 14:39:07 -0700
committerGary E. Miller <gem@rellim.com>2019-05-25 14:39:07 -0700
commitc0a78c2d2819cb9dca0ad3011d4ad4d3e22e0f18 (patch)
tree72963525dcdce61a061a2f5151b6a269eb08eb85 /ubxtool
parentbffe026876ad844bb33bdbd71065e456618ef917 (diff)
downloadgpsd-c0a78c2d2819cb9dca0ad3011d4ad4d3e22e0f18.tar.gz
ubxtool: en-/dis-able RAWX now affects RAW on older devices.
Protver 14 and below used UBX-RXM-RAW, after it uses RAWX.
Diffstat (limited to 'ubxtool')
-rwxr-xr-xubxtool14
1 files changed, 10 insertions, 4 deletions
diff --git a/ubxtool b/ubxtool
index 6897add6..822df752 100755
--- a/ubxtool
+++ b/ubxtool
@@ -4255,10 +4255,16 @@ class ubx(object):
gps_model.gps_send(6, 1, m_data)
def send_able_rawx(self, able):
- """dis/enable UBX-RXM-RAWX"""
+ """dis/enable UBX-RXM-RAW/RAWXX"""
rate = 1 if able else 0
- m_data = bytearray([0x2, 0x15, rate])
+ if 15 > opts['protver']:
+ # u-blox 7 or earlier, use RAW
+ sid = 0x10
+ else:
+ # u-blox 8 or later, use RAWX
+ sid = 0x15
+ m_data = bytearray([0x2, sid, rate])
gps_model.gps_send(6, 1, m_data)
def send_able_sbas(self, able):
@@ -4614,9 +4620,9 @@ class ubx(object):
# en/dis able basic NMEA messages
"NMEA": {"command": send_able_nmea,
"help": "basic NMEA messages"},
- # en/dis able RAWX
+ # en/dis able RAW/RAWX
"RAWX": {"command": send_able_rawx,
- "help": "RAWX measurements"},
+ "help": "RAW/RAWX measurements"},
# en/dis able SBAS
"SBAS": {"command": send_able_sbas,
"help": "SBAS"},