Fix GSV Parsing of Full Final Sentences

pull/20/head
Calvin McCoy 2018-05-19 17:56:47 -07:00
rodzic 0d7bdaeb60
commit c30df5828d
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -483,7 +483,8 @@ class MicropyGPS(object):
# Calculate Number of Satelites to pull data for and thus how many segment positions to read
if num_sv_sentences == current_sv_sentence:
sat_segment_limit = ((sats_in_view % 4) * 4) + 4 # Last sentence may have 1-4 satellites
# Last sentence may have 1-4 satellites; 5 - 20 positions
sat_segment_limit = (sats_in_view - ((num_sv_sentences - 1) * 4)) * 5
else:
sat_segment_limit = 20 # Non-last sentences have 4 satellites and thus read up to position 20