[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GPSD Issue #153 (Autobaud not working for me) Merge Request

From: Gary E. Miller
Subject: Re: GPSD Issue #153 (Autobaud not working for me) Merge Request
Date: Mon, 16 Aug 2021 16:36:59 -0700

Yo Jared!

On Mon, 16 Aug 2021 22:42:55 +0000
Jared Hagel <> wrote:

> Sorry for the confusion. Attached is a zip file containing the files
> I modified. The changes were made based on GPSD 3.23 release source
> code. For some reason when running 'diff' it created me a 200MB patch
> file, so I think I'll just copy the modified files here. The changes
> were fairly minor if you compare them to the GPSD 3.23 release.

The first copy had two copies of serial.c.  The zip was missing the
directories.  I put the files from the zip in gpsd/ and did a git
diff.  That is attached.

Before I even look at the meaning of the changes, there are basic
style issues to fix.

1) incorrect indents.

2) trailing white space

3) Missing FALLTHROUGH macro between cases:

         case AWAIT_GOT_INPUT:
+        case AWAIT_TIMEOUT:

4) gpsd can not enforce this:

+                // If a driver hasn't been determined yet (ie. we don't have en
ough data to
+                // determine the GPS receiver type) then check if we should
+                // change the baud rate.

5)  Don't split the initializer!

-    timespec_t ts_timeout = {3, 0};   // timeout for pselect()
+    struct timespec tv;


+    tv.tv_sec = 5;
+    tv.tv_nsec = 0;

It is a const to pselect() so never a need to reset it.

6) It is a ts, not a tv, the previous name was better.

7) why is 5 better than 3?

8)  Why did you re-apply this?

+            if (gap > min_cycle)
+                GPSD_LOG(LOG_WARN, &session->context->errout,
+                         "cycle-start detector failed.\n");

9)  This requires an ABI bump:

+    struct timespec ts_startCurrentBaud;

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: tmp.diff
Description: Text Data

Attachment: pgp_dDXGG3LVX.pgp
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]