From 648ccd2a9d3eb2fa2f88f2116a84b2e5ac6278b1 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Fri, 15 Jun 2018 20:29:03 -0700 Subject: u-blox: repect the often ignored readonly (-b) flag. --- driver_ubx.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'driver_ubx.c') 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; -- cgit v1.2.1