Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions adafruit_gps.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ def _parse_gpgga(self, args):
if data is None or len(data) != 14:
return # Unexpected number of params.
# Parse fix time.
time_utc = _parse_float(data[0])
time_utc = int(_parse_float(data[0]))
if time_utc is not None:
hours = time_utc // 10000
mins = int((time_utc // 100) % 100)
mins = (time_utc // 100) % 100
secs = time_utc % 100
# Set or update time to a friendly python time struct.
if self.timestamp_utc is not None:
Expand Down Expand Up @@ -184,10 +184,10 @@ def _parse_gprmc(self, args):
if data is None or len(data) < 11:
return # Unexpected number of params.
# Parse fix time.
time_utc = _parse_float(data[0])
time_utc = int(_parse_float(data[0]))
if time_utc is not None:
hours = time_utc // 10000
mins = int((time_utc // 100) % 100)
mins = (time_utc // 100) % 100
secs = time_utc % 100
# Set or update time to a friendly python time struct.
if self.timestamp_utc is not None:
Expand Down