Skip to content

Commit c277bcf

Browse files
committed
Made changes @ladyada suggested to @billxinli's code.
1 parent 8cf5191 commit c277bcf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_gps.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ def __init__(self, uart, debug=False):
114114
self.vdop = None
115115
self.total_mess_num = None
116116
self.mess_num = None
117+
self._raw_sentence = None
117118
self.debug = debug
118-
self.raw_sentence = None
119119

120120
def update(self):
121121
"""Check for updated data from the GPS module and process it
@@ -177,9 +177,9 @@ def datetime(self):
177177
return self.timestamp_utc
178178

179179
@property
180-
def raw_sentence(self):
180+
def nmea_sentence(self):
181181
"""Return raw_sentence which is the raw NMEA sentence read from the GPS"""
182-
return self.raw_sentence
182+
return self._raw_sentence
183183

184184
def _read_sentence(self):
185185
# Parse any NMEA sentence that is available.
@@ -208,7 +208,7 @@ def _read_sentence(self):
208208
return None # Failed to validate checksum.
209209

210210
# copy the raw sentence
211-
self.raw_sentence = sentence
211+
raw_sentence = sentence
212212

213213
return sentence
214214
# At this point we don't have a valid sentence

0 commit comments

Comments
 (0)