gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Gps application stops transmitting data after some time


From: lokesh kumar Nijalinge
Subject: Re: [gpsd-users] Gps application stops transmitting data after some time
Date: Wed, 16 Sep 2015 00:26:54 +0530

Hi Gary,

I tried commenting sleep(1) , but no data I am able to see.
When I again kept delay for 1second. I am able to see some data around 5 to 6 times only. After that it Stops at " No GPS data available ".

Thanks,
Lokesh

On Sep 15, 2015 11:13 PM, "Gary E. Miller" <address@hidden> wrote:
Yo lokesh!

On Tue, 15 Sep 2015 22:59:32 +0530
lokesh kumar Nijalinge <address@hidden> wrote:

> So I need to wait very less.
> Mean to say the statement   " if (gps_waiting (&gpsdata, 2000))"
> should be changed something to "  if (gps_waiting (&gpsdata, 2))".

No.  That is fine.  gps_waiting() returns when there is data available.

As the doc clearly says:

    "gps_waiting() can be used to check whether there is new data from
    the daemon. The second argument is the maximum amount of time to
    wait (in microseconds) on input before returning.  It returns true
    if there is input waiting, false on timeout (no data waiting) or
    error condition."

So 2000 is the MAX time to wait, which is fine.

> Am I right with above statement?

No.  The problem is the uninterruptible sleep(1).  Which is why that
is the part of the code I highlighted.

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]