gpsd-dev
[Top][All Lists]
Advanced

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

Re: Quectel FW version - Merge Request


From: Gary E. Miller
Subject: Re: Quectel FW version - Merge Request
Date: Fri, 4 Mar 2022 15:34:24 -0800

Yo Jared!

On Fri, 4 Mar 2022 23:13:56 +0000
Jared Hagel <jared.hagel@vontas.com> wrote:

> I tried to make this a merge request, but I got this following
> 'Rejected' email when I tried to do so. I'm not sure what I did wrong.

Odd,  you should be able to fork gpsd into your own GitLab account.
But I admit to being too lazy to do that.  What is your GitLab
handle?  I'll add it to gpsd project.

> Anyways, as requested I modified the lines of code I added to be less
> than 80 characters and attached debug output.

I'm not seeing the requested raw data log.  With that I can get my own
debug output.

> You can see the text
> 'PQVERNO' in this debug output. If you let me know which code I added
> is insecure I can fix that as well.

Codacy does not like the use of strlen(), use strnlen() instead.  Yes,
the existing code has existing strlen() and that is slowly getting
replaced.  New code must meet new Codacy requirement.

        {"PMTK", NULL, 3,  false, processMTK3301},
        {"PQVERNO", NULL, 3,  false, processMTK3301},

Do not use the same decode function for 2 different messages.  This
confuses the start/end cycle detectors.  Once again, there are existing
similar usages, but those are slowly being fixed.

field[2] is used before you have checked it contains data:

        (void)strlcpy(session->subtype1, session->nmea.field[2], 

As you said:

        // "$PQVERNO is an internal command and used to query Quectel FW 
        // version. We haven’t added this internal command in GNSS
        // protocol spec."

gpsd does not support undocuemnnted commands.  Please document it.

Potentially the data is queried even if gpsd already has it:

        (void)nmea_send(session, "$PQVERNO,R");

Check that subtype1 is empty first.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  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: pgpBp_9ABcMRW.pgp
Description: OpenPGP digital signature


reply via email to

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