diff options
author | Michalis Pappas <mpappas@fastmail.fm> | 2019-01-26 22:28:04 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2019-04-30 22:07:41 +0200 |
commit | c35a4d56d561920def33005b775e3544ad830013 (patch) | |
tree | fb5c549c9d400ff3eca02a3fd0db2e71fc57af5e /decoders/atsha204a | |
parent | 9e23c0982cd1a902f0ec1d6fe64a5cb4ca4e981b (diff) | |
download | libsigrokdecode-c35a4d56d561920def33005b775e3544ad830013.tar.gz libsigrokdecode-c35a4d56d561920def33005b775e3544ad830013.zip |
atsha204a: Only call output_tx_bytes() when the bytes buffer is not empty
Diffstat (limited to 'decoders/atsha204a')
-rw-r--r-- | decoders/atsha204a/pd.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/decoders/atsha204a/pd.py b/decoders/atsha204a/pd.py index d149c49..8e37e5b 100644 --- a/decoders/atsha204a/pd.py +++ b/decoders/atsha204a/pd.py @@ -287,7 +287,6 @@ class Decoder(srd.Decoder): def decode(self, ss, es, data): cmd, databyte = data - # State machine. if self.state == 'IDLE': # Wait for an I²C START condition. @@ -309,7 +308,8 @@ class Decoder(srd.Decoder): # Reset the opcode before received data, as this causes # responses to be displayed incorrectly. self.opcode = -1 - self.output_rx_bytes() + if len(self.bytes) > 0: + self.output_rx_bytes() self.waddr = -1 self.bytes = [] self.state = 'IDLE' |