taimos / GPSd4Java

GPSd client library written in Java
Apache License 2.0
41 stars 32 forks source link

Deadlock in GPSdEndpoint.stop() #16

Closed msemtd closed 8 years ago

msemtd commented 9 years ago

I always encounter a deadlock when GPSdEndpoint.stop() is called (Oracle JDK 1.7.0_51 on Windows 7) due to SocketThread.halt() calling this.reader.close().

Is there another way to make GPSd4Java stoppable and startable?

hoegertn commented 9 years ago

I will have a look at it

hoegertn commented 9 years ago

Merged the PR and will create a release if you need it asap.

rapaza1 commented 9 years ago

Could you please share java example code on how to use gpsd4java? Looked all over the internet and can't find any. Thx a 1,000,000

hoegertn commented 9 years ago

You can have a look at the Tester class (https://github.com/taimos/GPSd4Java/blob/master/src/test/java/de/taimos/gpsd4java/test/Tester.java)

It connects to a gpsd on localhost.

anhdenday commented 8 years ago

Hi @hoegertn Could you please tell me how to get Longitude and Latitude by GPSd4Java. Thanks you so much

hoegertn commented 8 years ago

Hi, just have a look at the class mentioned above. In line 86 you get a TPVObject if a new position was received. This object has getLatitude() and getLongitude() methods.

anhdenday commented 8 years ago

Hi thanks you @hoegertn , I will check it!