Skip to content

Commit 6971e89

Browse files
committed
include key as well as value when iterating over satellite dictionary
1 parent a310747 commit 6971e89

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_gps.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -699,9 +699,9 @@ def _parse_gsv(self, talker: bytes, data: List[str]) -> bool:
699699
# been seen for 30 seconds
700700
timestamp = time.monotonic()
701701
old = []
702-
for sat in self.sats.values():
703-
if (timestamp - sat[4]) > 30:
704-
old.append(i)
702+
for sat_id, sat_data in self.sats.items():
703+
if (timestamp - sat_data[4]) > 30:
704+
old.append(sat_id)
705705
for i in old:
706706
self.sats.pop(i)
707707
for sat in self._sats:

0 commit comments

Comments
 (0)