Skip to content

Commit

Permalink
Fix data field recursion error
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Jun 10, 2020
1 parent f61a182 commit 729f1a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pynmea2/types/proprietary/mtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ class MTK010(MTK):
"""
fields = (
('Blank', '_'),
('Data', 'data', int), # 0 = UNKNOWN
# 1 = STARTUP
# 2 = Notification for host aiding EPO
# 3 = Notification for transition to Normal mode success
('Msg', 'msg', int), # 0 = UNKNOWN
# 1 = STARTUP
# 2 = Notification for host aiding EPO
# 3 = Notification for transition to Normal mode success
)


Expand Down
7 changes: 7 additions & 0 deletions test/test_mtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ def test_mtk001():
assert msg.flag == 3


def test_mtk010():
data = '$PMTK010,002*2D'
msg = pynmea2.parse(data)
assert isinstance(msg, pynmea2.types.mtk.MTK010)
assert msg.msg == 2


def test_mtk220():
sentence = pynmea2.ProprietarySentence('MTK', ('220', '200', ))
assert str(sentence) == '$PMTK220,200*2C'

0 comments on commit 729f1a7

Please sign in to comment.