Skip to content

Commit

Permalink
Only reset comms with set_key() if key is different
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-dewar committed Nov 4, 2020
1 parent 151e873 commit 0f25381
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion software/chipwhisperer/capture/targets/SimpleSerial2.py
Expand Up @@ -574,8 +574,8 @@ def set_key(self, key, ack=True, timeout=250):
Raises:
Warning: Device did not ack or error during read.
"""
self.reset_comms()
if self.last_key != key:
self.reset_comms()
self.last_key = key
self.simpleserial_write('k', key)
if ack:
Expand Down

0 comments on commit 0f25381

Please sign in to comment.