gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] nmea watch enabled at client connect?


From: Gary E. Miller
Subject: Re: [gpsd-dev] nmea watch enabled at client connect?
Date: Wed, 5 Jun 2013 10:28:08 -0700

Yo Bernd!

I think you just need to use gpspipe.  That make a pipe from gpsd
protocol to NMEA protocol.

On Wed, 5 Jun 2013 11:36:20 +0200 (CEST)
Bernd Ocklin <address@hidden> wrote:

> Hi,
> 
> the below 3 lines enable / disable nmea when a new subscriber
> connects. This is needed to serve apps like iNavX who don't speak
> gpsd. Would a proper patch have any chance to get review and into
> gpsd when I submit one?
> 
> How about a new config option -W (--watch)? This option has either
> the json command string {"enabled": true, ...} or a simple string
> "nmea, raw" as parameter:
> 
> e.g. gpsd -W '{"enabled": true, "nmea": true, ...}'
> 
> or
> 
> gpsd -W 'nmea,json' if you want to enable nmea and json format at
> client subscription.
> 
> Any preferences?
> 
> I use this patch in production with a hardcoded change in
> allocate_client() but happy to provide a better patch with config
> options and proper formating if there is interest.
> 
> --- a/gpsd.c
> +++ b/gpsd.c
> @@ -549,6 +549,9 @@ static /address@hidden@*//address@hidden@ */ struct
>      for (si = 0; si < NITEMS(subscribers); si++) {
>      if (subscribers[si].fd == UNALLOCATED_FD) {
>          subscribers[si].fd = 0;    /* mark subscriber as allocated */
> +        subscribers[si].policy.watcher = true;
> +        subscribers[si].policy.nmea    = true;
> +        subscribers[si].policy.json    = false;
>          return &subscribers[si];
>      }
>      }
> 
> Bernd
> 




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588

Attachment: signature.asc
Description: PGP signature


reply via email to

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