kopia lustrzana https://github.com/projecthorus/chasemapper
rodzic
3b02f751f2
commit
8aec30178c
|
@ -8,4 +8,4 @@
|
||||||
|
|
||||||
# Now using Semantic Versioning (https://semver.org/) MAJOR.MINOR.PATCH
|
# Now using Semantic Versioning (https://semver.org/) MAJOR.MINOR.PATCH
|
||||||
|
|
||||||
__version__ = "1.5.1"
|
__version__ = "1.5.2"
|
||||||
|
|
|
@ -366,6 +366,8 @@ class GPSDAdaptor(object):
|
||||||
_gpsd_socket.watch(gpsd_protocol="json")
|
_gpsd_socket.watch(gpsd_protocol="json")
|
||||||
logging.info("GPSD - Connected to GPSD instance at %s" % self.hostname)
|
logging.info("GPSD - Connected to GPSD instance at %s" % self.hostname)
|
||||||
|
|
||||||
|
_old_state = {}
|
||||||
|
|
||||||
while self.gpsd_thread_running:
|
while self.gpsd_thread_running:
|
||||||
# We should be getting GPS data every second.
|
# We should be getting GPS data every second.
|
||||||
# If this isn't the case, we should close the connection and re-connect.
|
# If this isn't the case, we should close the connection and re-connect.
|
||||||
|
@ -403,7 +405,10 @@ class GPSDAdaptor(object):
|
||||||
"valid": True,
|
"valid": True,
|
||||||
}
|
}
|
||||||
|
|
||||||
self.send_to_callback(_gps_state)
|
if _gps_state != _old_state:
|
||||||
|
self.send_to_callback(_gps_state)
|
||||||
|
|
||||||
|
_old_state = _gps_state
|
||||||
|
|
||||||
# Close the GPSD connection.
|
# Close the GPSD connection.
|
||||||
try:
|
try:
|
||||||
|
|
Ładowanie…
Reference in New Issue