gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] [PATCH] gps.py: Don't negate flags twice!


From: Nuno Gonçalves
Subject: Re: [gpsd-dev] [PATCH] gps.py: Don't negate flags twice!
Date: Mon, 13 Jun 2016 21:38:44 +0100

For example run gpsprof (with any option). When terminating you'll see
the following error at the gpsd debug output:

gpsd:CLIENT: <= client(0):
?WATCH={"enable":true,"nmea":true,"raw":1,"raw":2,"scaled":true,"split24":true,"pps":true,"device":"None"}\x0a
gpsd:ERROR: response: {"class":"ERROR","message":"No such device as
None"}\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"ERROR","message":"No such device
as None"}\x0d\x0a

This patch fixes this.

Or do this require a regression test to be commited first? I'm not
aware of the dev rules, and I'm not sure I can really do it.

On Mon, Jun 13, 2016 at 7:55 PM, Gary E. Miller <address@hidden> wrote:
> Yo Nuno!
>
> How would someone test this?
>
> On Mon, 13 Jun 2016 19:32:23 +0100
> Nuno Gonçalves <address@hidden> wrote:
>
>> Flags are already interpreted as false at class gpsjson when
>> WATCH_DISABLE is present.
>>
>> Signed-off-by: Nuno Goncalves <address@hidden>
>> ---
>>  gps/gps.py | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gps/gps.py b/gps/gps.py
>> index 46daa9d..d80fac9 100755
>> --- a/gps/gps.py
>> +++ b/gps/gps.py
>> @@ -280,7 +280,7 @@ class gps(gpscommon, gpsdata, gpsjson):
>>                      arg += 'r-'
>>                      return self.send(arg)
>>              else:
>> -                gpsjson.stream(self, ~flags, devpath)
>> +                gpsjson.stream(self, flags, devpath)
>>          else:  # flags & WATCH_ENABLE:
>>              if flags & WATCH_OLDSTYLE:
>>                  arg = 'w+'
>
>
>
>
> RGDS
> GARY
> ---------------------------------------------------------------------------
> Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
>         address@hidden  Tel:+1 541 382 8588



reply via email to

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