From: Uwe Hermann Date: Fri, 6 Dec 2019 21:25:55 +0000 (+0100) Subject: ieee488: Simplify _get_raw_byte() a bit. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=08198247a57a4352c3a1f1201da7b52e0ede15c4;p=libsigrokdecode.git ieee488: Simplify _get_raw_byte() a bit. --- 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)]