@@ -265,6 +265,7 @@ def update(self):
265
265
return True
266
266
267
267
result = True
268
+ args = args .split ("," )
268
269
if sentence_type == b"GLL" : # Geographic position - Latitude/Longitude
269
270
result = self ._parse_gll (args )
270
271
elif sentence_type == b"RMC" : # Minimum location info
@@ -406,10 +407,9 @@ def _update_timestamp_utc(self, time_utc, date=None):
406
407
(year , month , day , hours , mins , secs , 0 , 0 , - 1 )
407
408
)
408
409
409
- def _parse_gll (self , args ):
410
+ def _parse_gll (self , data ):
410
411
# GLL - Geographic Position - Latitude/Longitude
411
412
412
- data = args .split ("," )
413
413
if data is None or len (data ) != 7 :
414
414
return False # Unexpected number of params.
415
415
data = _parse_data (_GLL , data )
@@ -433,10 +433,9 @@ def _parse_gll(self, args):
433
433
434
434
return True
435
435
436
- def _parse_rmc (self , args ):
436
+ def _parse_rmc (self , data ):
437
437
# RMC - Recommended Minimum Navigation Information
438
438
439
- data = args .split ("," )
440
439
if data is None or len (data ) != 12 :
441
440
return False # Unexpected number of params.
442
441
data = _parse_data (_RMC , data )
@@ -477,10 +476,9 @@ def _parse_rmc(self, args):
477
476
478
477
return True
479
478
480
- def _parse_gga (self , args ):
479
+ def _parse_gga (self , data ):
481
480
# GGA - Global Positioning System Fix Data
482
481
483
- data = args .split ("," )
484
482
if data is None or len (data ) != 14 :
485
483
return False # Unexpected number of params.
486
484
data = _parse_data (_GGA , data )
@@ -527,10 +525,9 @@ def _parse_gga(self, args):
527
525
528
526
return True
529
527
530
- def _parse_gsa (self , talker , args ):
528
+ def _parse_gsa (self , talker , data ):
531
529
# GSA - GPS DOP and active satellites
532
530
533
- data = args .split ("," )
534
531
if data is None or len (data ) not in (17 , 18 ):
535
532
return False # Unexpected number of params.
536
533
if len (data ) == 17 :
@@ -566,11 +563,10 @@ def _parse_gsa(self, talker, args):
566
563
567
564
return True
568
565
569
- def _parse_gsv (self , talker , args ):
566
+ def _parse_gsv (self , talker , data ):
570
567
# GSV - Satellites in view
571
568
# pylint: disable=too-many-branches
572
569
573
- data = args .split ("," )
574
570
if data is None or len (data ) not in (7 , 11 , 15 , 19 ):
575
571
return False # Unexpected number of params.
576
572
data = _parse_data (
0 commit comments