adafruit-circuitpython-gps 3.11.10__tar.gz → 4.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/PKG-INFO +1 -1
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/adafruit_circuitpython_gps.egg-info/PKG-INFO +1 -1
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/adafruit_gps.py +16 -6
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/pyproject.toml +1 -1
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/tests/adafruit_gps_test.py +4 -4
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/.coveragerc +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/.gitattributes +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/.github/workflows/build.yml +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/.github/workflows/failure-help-text.yml +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/.github/workflows/release_gh.yml +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/.github/workflows/release_pypi.yml +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/.gitignore +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/.pre-commit-config.yaml +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/.readthedocs.yaml +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/CODE_OF_CONDUCT.md +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/LICENSE +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/LICENSES/CC-BY-4.0.txt +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/LICENSES/MIT.txt +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/LICENSES/Unlicense.txt +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/README.rst +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/README.rst.license +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/adafruit_circuitpython_gps.egg-info/SOURCES.txt +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/adafruit_circuitpython_gps.egg-info/dependency_links.txt +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/adafruit_circuitpython_gps.egg-info/requires.txt +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/adafruit_circuitpython_gps.egg-info/top_level.txt +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/_static/custom.css +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/_static/favicon.ico +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/_static/favicon.ico.license +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/api.rst +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/api.rst.license +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/conf.py +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/details.rst +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/details.rst.license +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/examples.rst +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/examples.rst.license +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/index.rst +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/index.rst.license +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/requirements.txt +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/examples/gps_datalogging.py +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/examples/gps_displayio_simpletest.py +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/examples/gps_echotest.py +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/examples/gps_satellitefix.py +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/examples/gps_simpletest.py +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/examples/gps_time_source.py +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/optional_requirements.txt +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/requirements.txt +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/ruff.toml +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/setup.cfg +0 -0
- {adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/tests/__init__.py +0 -0
|
@@ -40,7 +40,7 @@ try:
|
|
|
40
40
|
except ImportError:
|
|
41
41
|
pass
|
|
42
42
|
|
|
43
|
-
__version__ = "
|
|
43
|
+
__version__ = "4.0.0"
|
|
44
44
|
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_GPS.git"
|
|
45
45
|
|
|
46
46
|
|
|
@@ -315,9 +315,14 @@ class GPS:
|
|
|
315
315
|
| 3 - 3D fix
|
|
316
316
|
"""
|
|
317
317
|
self.satellites = None
|
|
318
|
-
"""The number of satellites in use, 0 - 12"""
|
|
318
|
+
"""The number of satellites in use (GGA), 0 - 12"""
|
|
319
319
|
self.satellites_prev = None
|
|
320
320
|
"""The number of satellites in use from the previous data point, 0 - 12"""
|
|
321
|
+
self.satellites_in_view = None
|
|
322
|
+
"""The number of satellites in view (GSV), 0 - 12"""
|
|
323
|
+
self.satellites_in_view_prev = None
|
|
324
|
+
"""The number of satellites in view from the previous data point, 0 - 12"""
|
|
325
|
+
|
|
321
326
|
self.horizontal_dilution = None
|
|
322
327
|
"""Horizontal dilution of precision (GGA)"""
|
|
323
328
|
self.altitude_m = None
|
|
@@ -678,6 +683,9 @@ class GPS:
|
|
|
678
683
|
# GPS quality indicator
|
|
679
684
|
self.fix_quality = parsed_data[5]
|
|
680
685
|
|
|
686
|
+
# Capture previous value
|
|
687
|
+
self.satellites_prev = self.satellites
|
|
688
|
+
|
|
681
689
|
# Number of satellites in use, 0 - 12
|
|
682
690
|
self.satellites = parsed_data[6]
|
|
683
691
|
|
|
@@ -754,8 +762,12 @@ class GPS:
|
|
|
754
762
|
self.total_mess_num = data[0]
|
|
755
763
|
# Message number
|
|
756
764
|
self.mess_num = data[1]
|
|
765
|
+
|
|
766
|
+
# Capture previous value
|
|
767
|
+
self.satellites_in_view_prev = self.satellites_in_view
|
|
768
|
+
|
|
757
769
|
# Number of satellites in view
|
|
758
|
-
self.
|
|
770
|
+
self.satellites_in_view = data[2]
|
|
759
771
|
|
|
760
772
|
sat_tup = data[3:]
|
|
761
773
|
|
|
@@ -784,7 +796,7 @@ class GPS:
|
|
|
784
796
|
|
|
785
797
|
if self.mess_num == self.total_mess_num:
|
|
786
798
|
# Last part of GSV message
|
|
787
|
-
if len(self._sats) == self.
|
|
799
|
+
if len(self._sats) == self.satellites_in_view:
|
|
788
800
|
# Transfer received satellites to self.sats
|
|
789
801
|
if self.sats is None:
|
|
790
802
|
self.sats = {}
|
|
@@ -802,8 +814,6 @@ class GPS:
|
|
|
802
814
|
self.sats[sat[0]] = sat
|
|
803
815
|
self._sats.clear()
|
|
804
816
|
|
|
805
|
-
self.satellites_prev = self.satellites
|
|
806
|
-
|
|
807
817
|
return True
|
|
808
818
|
|
|
809
819
|
|
|
@@ -12,7 +12,7 @@ requires = [
|
|
|
12
12
|
[project]
|
|
13
13
|
name = "adafruit-circuitpython-gps"
|
|
14
14
|
description = "CircuitPython library for GPS modules."
|
|
15
|
-
version = "
|
|
15
|
+
version = "4.0.0"
|
|
16
16
|
readme = "README.rst"
|
|
17
17
|
authors = [
|
|
18
18
|
{name = "Adafruit Industries", email = "circuitpython@adafruit.com"}
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/tests/adafruit_gps_test.py
RENAMED
|
@@ -421,7 +421,7 @@ def test_GPS_update_from_GSV_first_part():
|
|
|
421
421
|
assert gps.update()
|
|
422
422
|
assert gps.total_mess_num == 2
|
|
423
423
|
assert gps.mess_num == 1
|
|
424
|
-
assert gps.
|
|
424
|
+
assert gps.satellites_in_view == 8
|
|
425
425
|
# check two satellites, without timestamp, since it is dynamic
|
|
426
426
|
sats = gps._sats
|
|
427
427
|
assert sats[0][:-1] == ("GP1", 40, 83, 46)
|
|
@@ -449,7 +449,7 @@ def test_GPS_update_from_GSV_both_parts_sats_are_removed():
|
|
|
449
449
|
assert gps.update()
|
|
450
450
|
assert gps.total_mess_num == 2
|
|
451
451
|
assert gps.mess_num == 1
|
|
452
|
-
assert gps.
|
|
452
|
+
assert gps.satellites_in_view == 4
|
|
453
453
|
# first time we received satellites, so this must be None
|
|
454
454
|
assert gps.sats is None
|
|
455
455
|
# some time has passed so the first two satellites will be too old, but
|
|
@@ -460,7 +460,7 @@ def test_GPS_update_from_GSV_both_parts_sats_are_removed():
|
|
|
460
460
|
assert gps.update()
|
|
461
461
|
assert gps.total_mess_num == 2
|
|
462
462
|
assert gps.mess_num == 2
|
|
463
|
-
assert gps.
|
|
463
|
+
assert gps.satellites_in_view == 4
|
|
464
464
|
# we should now have 4 satellites from the two part request
|
|
465
465
|
assert set(gps.sats.keys()) == {"GP1", "GP2", "GP12", "GP14"}
|
|
466
466
|
|
|
@@ -470,7 +470,7 @@ def test_GPS_update_from_GSV_both_parts_sats_are_removed():
|
|
|
470
470
|
# a third, one part request
|
|
471
471
|
m.return_value = b"$GPGSV,1,1,02,13,07,344,39,15,22,228,45*7a\r\n"
|
|
472
472
|
assert gps.update()
|
|
473
|
-
assert gps.
|
|
473
|
+
assert gps.satellites_in_view == 2
|
|
474
474
|
assert set(gps.sats.keys()) == {"GP12", "GP14", "GP13", "GP15"}
|
|
475
475
|
|
|
476
476
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/.github/workflows/build.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/.pre-commit-config.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/LICENSES/CC-BY-4.0.txt
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/LICENSES/Unlicense.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/_static/custom.css
RENAMED
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/_static/favicon.ico
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/api.rst.license
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/details.rst.license
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/examples.rst.license
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/index.rst.license
RENAMED
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/docs/requirements.txt
RENAMED
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/examples/gps_datalogging.py
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/examples/gps_echotest.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/examples/gps_satellitefix.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/examples/gps_simpletest.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/examples/gps_time_source.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_gps-3.11.10 → adafruit_circuitpython_gps-4.0.0}/optional_requirements.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|