MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / __init__

Method __init__

Software/Python/Examples/gps_reading.py:28–40  ·  view source on GitHub ↗
(self,port='/dev/ttyAMA0',baud=9600,timeout=0)

Source from the content-addressed store, hash-verified

26
27class GROVEGPS():
28 def __init__(self,port='/dev/ttyAMA0',baud=9600,timeout=0):
29 self.ser = serial.Serial(port,baud,timeout=timeout)
30 self.ser.flush()
31 self.raw_line = ""
32 self.gga = []
33 self.validation =[] # contains compiled regex
34
35 # compile regex once to use later
36 for i in range(len(patterns)-1):
37 self.validation.append(re.compile(patterns[i]))
38
39 self.clean_data()
40 # self.get_date() # attempt to gete date from GPS.
41
42 def clean_data(self):
43 '''

Callers

nothing calls this directly

Calls 1

clean_dataMethod · 0.95

Tested by

no test coverage detected