Skip to content

Commit 9f90c48

Browse files
committed
Refactor for mpy-cross
1 parent 4ccc6b9 commit 9f90c48

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adafruit_gps.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ def _parse_degrees(nmea_data):
8686
raw = nmea_data.split(".")
8787
deg = int(raw[0]) // 100 * 1000000 # the ddd
8888
minutes = int(raw[0]) % 100 # the mm.
89-
minutes += int(f"{raw[1][:4]:0<4}") / 10000 # the .mmmm
89+
tmp = raw[1][:4] # mpy-cross wont compile if this is directly in the next line
90+
minutes += int(f"{tmp:0<4}") / 10000
9091
minutes = int(minutes / 60 * 1000000)
9192
return deg + minutes
9293

0 commit comments

Comments
 (0)