summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver_ubx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/driver_ubx.c b/driver_ubx.c
index 6f9e2396..d9791c30 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -855,6 +855,10 @@ bool ubx_write(struct gps_device_t * session,
size_t i;
bool ok;
+ /* do not write if -b (readonly) option set */
+ if (session->context->readonly)
+ return true;
+
session->msgbuf[0] = 0xb5;
session->msgbuf[1] = 0x62;