Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
taichunmin committed Oct 25, 2023
1 parent e5656ac commit e669a9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions software/script/chameleon_cmd.py
Original file line number Diff line number Diff line change
@@ -280,9 +280,9 @@ class CStruct(ctypes.BigEndianStructure):
@expect_response(Status.HF_TAG_OK)
def mf1_manipulate_value_block(self, src_block, src_type: MfcKeyType, src_key, operator: MfcValueBlockOperator, operand, dst_block, dst_type: MfcKeyType, dst_key):
"""
1. Increment: increments the contents of a block and stores the result in the internal Transfer Buffer
2. Decrement: decrements the contents of a block and stores the result in the internal Transfer Buffer
3. Restore: reads the contents of a block into the internal Transfer Buffer
1. Increment: increments value from source block and write to dest block
2. Decrement: decrements value from source block and write to dest block
3. Restore: copy value from source block and write to dest block
:param src_block:
@@ -297,7 +297,7 @@ def mf1_manipulate_value_block(self, src_block, src_type: MfcKeyType, src_key, o
"""
data = struct.pack('!BB6sBiBB6s', src_type, src_block, src_key, operator, operand, dst_type, dst_block, dst_key)
resp = self.device.send_cmd_sync(Command.MF1_MANIPULATE_VALUE_BLOCK, data)
resp.data = resp.status == Status.HF_TAG_OK
resp.parsed = resp.status == Status.HF_TAG_OK
return resp

@expect_response(Status.HF_TAG_OK)

0 comments on commit e669a9f

Please sign in to comment.