-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queue Report pile up in indi_gpsd #180
Comments
Thank you, I noticed this issue too. @rkaczorek What do you think? |
Seems reasonable to me. @rtlprmft could you submit PR so I can review complete change? |
That is an obvious bug. I second the need for a fix. If you have a a patch for that @rtlprmft please submit a PR, otherwise we (authors of gpsd) need to fix this. |
I am sorry, but I have no idea how to do so. Code snippet that solves the problem (empties the queue) is above. I am happy for any advice. |
@jochym are you going to handle it? |
@rkaczorek I'll do it today |
Empty the buffer of gpsd daemon and keep just last segment of data. Fix suggested by @rtlprmft in indilib#180
I am not sure whether this is a general issue or depends on my configuration. I am using a ublox7-usb module with indi_gpsd. When I enable the automatic refresh (1s, 5s, or even manually), for every refresh, the time only increases by only one second. To my understanding, this is because the gpsd delivers a continuous stream and buffers this stream. When the buffer is then read with gps->read() only the next (but not the most recent report gets read. Therefore, I suggest the following change (works for me flewlessly):
Wrap the gps->read() in w a while loop which makes sure that the queue is empty:
The text was updated successfully, but these errors were encountered: