Skip to content
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

QGPSDDevice: tell gpsd to send nmea data #192

Merged
merged 1 commit into from
Sep 23, 2019
Merged

QGPSDDevice: tell gpsd to send nmea data #192

merged 1 commit into from
Sep 23, 2019

Conversation

z3ntu
Copy link
Contributor

@z3ntu z3ntu commented Jul 4, 2019

The initialization sequence is not valid anymore since gpsd 2.91, so
update the command for gpsd to send data.
Otherwise no data will be received by Merkaartor from gpsd.

Tested with gpsd 3.18.1

@Krakonos
Copy link
Member

Krakonos commented Aug 9, 2019

Thanks! Do you have a way to test it without an actual GPS device supported by gpsd? I know they have some simulation tool, but I was unable to make it work last time I touched it.

Anyway, the place you put it is probably wrong. Two issues: at the time this call gets executed, the link may not be established yet. I'm not sure what happens in that case. Second issue is that onLinkReady function is called as soon as the link is established, and might get mixed up (or at least change the order) with this call. Perhaps the correct place to put it is into the onLinkReady?

@z3ntu
Copy link
Contributor Author

z3ntu commented Aug 9, 2019

I tested this with a real device connected via ssh port forwarding.

As for what happens if the link isn't established, according to the documentation, the call returns -1 if an error occurred.

I have to say that file is really confusing to read with all the ifdefs in there.. Anyways, it seems that in both instances of QGPSDDevice::onLinkReady there are already some Server->write or Server->stream statements that probably should do something...

@Krakonos
Copy link
Member

Krakonos commented Aug 9, 2019

Yes, it's a mess. It actually seems we could replace this completely with QtPositioning, see #169 . There even seems to be a gpsd plugin, so we might not loose any functionality at all.

@Krakonos Krakonos added this to the 0.18.4 milestone Sep 22, 2019
@Krakonos
Copy link
Member

Hi!
Would you mind updating the PR and moving the call into onLinkReady function? I'd like to merge this PR for 0.18.4 and do the release soon.

Thanks.

@z3ntu
Copy link
Contributor Author

z3ntu commented Sep 22, 2019

I believe I made the requested changes. It should work in theory but I haven't tested it yet. If you want, I can test it tomorrow

The initialization sequence is not valid anymore since gpsd 2.91, so
update the command for gpsd to send data.
Otherwise no data will be received by Merkaartor from gpsd.

Tested with gpsd 3.18.1
@z3ntu
Copy link
Contributor Author

z3ntu commented Sep 23, 2019

Updated and confirmed working with gpsd 3.18.1.

@Krakonos Krakonos merged commit ebd2711 into openstreetmap:master Sep 23, 2019
@Krakonos
Copy link
Member

Thanks, merged.

@z3ntu z3ntu deleted the gpsd_nmea branch September 23, 2019 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants