summaryrefslogtreecommitdiff
path: root/decoders/ieee488
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2019-12-06 22:25:55 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2019-12-06 22:25:55 +0100
commit08198247a57a4352c3a1f1201da7b52e0ede15c4 (patch)
tree9764a77eb8eb1696019185ccd0b494cadab32a14 /decoders/ieee488
parent92ee3b2841960d3ac8ca736943cf23d73a41874e (diff)
downloadlibsigrokdecode-08198247a57a4352c3a1f1201da7b52e0ede15c4.tar.gz
libsigrokdecode-08198247a57a4352c3a1f1201da7b52e0ede15c4.zip
ieee488: Simplify _get_raw_byte() a bit.
Diffstat (limited to 'decoders/ieee488')
-rw-r--r--decoders/ieee488/pd.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/decoders/ieee488/pd.py b/decoders/ieee488/pd.py
index 5c25c66..ed3d39b 100644
--- a/decoders/ieee488/pd.py
+++ b/decoders/ieee488/pd.py
@@ -145,10 +145,7 @@ def _is_msb_set(b):
def _get_raw_byte(b, atn):
# "Decorate" raw byte values for stacked decoders.
- raw_byte = b
- if atn:
- raw_byte |= 0x100
- return raw_byte
+ return b | 0x100 if atn else b
def _get_raw_text(b, atn):
return ['{leader}{data:02x}'.format(leader = '/' if atn else '', data = b)]