Skip to content

Commit

Permalink
fix: add counter filed for iBS03DI
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Chao <tim.chao@ingics.com>
  • Loading branch information
timscchao committed Nov 28, 2023
1 parent 5b0a0e8 commit bb00c4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion igsparser/msd.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def fieldAccels(self, idx):
0x22: {'name': 'iRS02RG', 'fields': ['fieldAccel'], 'events': ['hall']},
0x23: {'name': 'iBS03NT', 'fields': ['fieldDummy', 'fieldTempExt', 'fieldUser'], 'events': []},
0x24: {'name': 'iBS03AD', 'fields': ['fieldDummy', 'fieldVoltage', 'fieldUser'], 'events': []},
0x25: {'name': 'iBS03DI', 'fields': ['fieldDummy', 'fieldDummy', 'fieldUser'], 'events': ['din']},
0x25: {'name': 'iBS03DI', 'fields': ['fieldDummy', 'fieldCounter', 'fieldUser'], 'events': ['din']},
0x30: {'name': 'iBS05', 'fields': ['fieldDummy', 'fieldDummy', 'fieldUser'], 'events': ['button']},
0x31: {'name': 'iBS05H', 'fields': ['fieldDummy', 'fieldDummy', 'fieldUser'], 'events': ['button', 'hall']},
0x32: {'name': 'iBS05T', 'fields': ['fieldTemp', 'fieldDummy', 'fieldUser'], 'events': ['button']},
Expand Down
1 change: 1 addition & 0 deletions tests/test_ibs03.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,5 @@ def handler(data, index):
assert hasattr(msd, 'temperature') == False
assert msd.events.din is True
assert msd.user == 100
assert msd.counter == 2566
MessageParser.parse(message, handler)

0 comments on commit bb00c4c

Please sign in to comment.