Skip to content

Commit

Permalink
protocol parameters must be sorted for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nehpetsde committed Mar 30, 2017
1 parent 17ae369 commit 4344bee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/nfc/clf/rcs380.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def in_set_protocol(self, data=None, **kwargs):
"check_sof", "add_eof", "check_eof", "rfu", "deaf_time",
"continuous_receive_mode", "min_len_for_crm",
"type_1_tag_rrdd", "rfca", "guard_time")
for key, value in kwargs.iteritems():
for key, value in sorted(kwargs.iteritems()):
data.extend(bytearray([KEYS.index(key), int(value)]))
if len(data) > 0:
data = self.send_command(0x02, data)
Expand Down
8 changes: 4 additions & 4 deletions tests/test_clf_rcs380.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def test_sense_tta_with_no_target_found(self, device):
CMD('02 00180101020103000400050006000708'
' 080009000a000b000c000e040f001000'
' 110012001306'),
CMD('02 00060100020007070501'),
CMD('02 01000200050100060707'),
CMD('04 360126'),
]]

Expand All @@ -289,7 +289,7 @@ def test_sense_tta_with_receive_errors(self, device):
CMD('02 00180101020103000400050006000708'
' 080009000a000b000c000e040f001000'
' 110012001306'),
CMD('02 00060100020007070501'),
CMD('02 01000200050100060707'),
CMD('04 360126'),
]]

Expand All @@ -316,7 +316,7 @@ def test_sense_ttb_with_no_target_found(self, device):
CMD('02 00180101020103000400050006000708'
' 080009000a000b000c000e040f001000'
' 110012001306'),
CMD('02 00140a010c010b010901'),
CMD('02 0b0109010c010a010014'),
CMD('04 3601050010'),
]]

Expand All @@ -338,7 +338,7 @@ def test_sense_ttb_with_receive_errors(self, device):
CMD('02 00180101020103000400050006000708'
' 080009000a000b000c000e040f001000'
' 110012001306'),
CMD('02 00140a010c010b010901'),
CMD('02 0b0109010c010a010014'),
CMD('04 3601050010'),
]]

Expand Down

0 comments on commit 4344bee

Please sign in to comment.