From 08198247a57a4352c3a1f1201da7b52e0ede15c4 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Fri, 6 Dec 2019 22:25:55 +0100 Subject: ieee488: Simplify _get_raw_byte() a bit. --- decoders/ieee488/pd.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'decoders/ieee488') 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)] -- cgit v1.2.3-70-g09d2