Update gsmHat.py

Some Waveshare devices return more than 21 data items for GPS data
This commit is contained in:
Patrick Joy
2021-04-17 15:48:04 +10:00
committed by GitHub
parent f8e4bf75f2
commit 1c63208d2b
+2 -2
View File
@@ -344,7 +344,7 @@ class GSMHat:
self.__logger.debug('New GPS Data:')
match = re.findall(self.regexGetAllValues, self.__serData)
rawData = match[0][1].split(',')
if len(rawData) == 21:
if len(rawData) >= 21:
newGPS = GPS()
goodPosition = True
@@ -773,4 +773,4 @@ class GSMHat:
# Let other Threads also do their job
time.sleep(0.1)
self.__logger.info('Worker ended')
self.__logger.info('Worker ended')