diff options
author | Gerhard Sittig <gerhard.sittig@gmx.net> | 2019-12-12 10:39:57 +0100 |
---|---|---|
committer | Gerhard Sittig <gerhard.sittig@gmx.net> | 2019-12-12 10:39:57 +0100 |
commit | 6d718968df2909655c84bbe4938b72b5b7178ead (patch) | |
tree | dd74faac35bfc446d406678790b9dd15570be1de /decoders/rfm12/pd.py | |
parent | 1d7e79da75afbdfd5d1863de6482bf4cd21e5c7e (diff) | |
download | libsigrokdecode-6d718968df2909655c84bbe4938b72b5b7178ead.tar.gz libsigrokdecode-6d718968df2909655c84bbe4938b72b5b7178ead.zip |
signature: increase compatibility across Python versions
Underscores in number literals are a recent Python feature which only
was introduced in version 3.6. The sigrok project claims compatibility
with previous Python versions, but the signature decoder fails to load
with this error:
$ pulseview
srd: SyntaxError: Failed to load decoder signature: import by name failed: invalid syntax (pd.py, line 138)
srd: Traceback (most recent call last):
File "/home/user/share/libsigrokdecode/decoders/signature/__init__.py", line 25, in <module>
from .pd import Decoder
File "/home/user/share/libsigrokdecode/decoders/signature/pd.py", line 138
incoming = (bin(shiftreg & 0b0000_0010_1001_0001).count('1') + data) & 1
^
SyntaxError: invalid syntax
Use the more compact hex presentation for a magic binary pattern. This
obsoletes the necessity to separate groups of bits for readability.
Diffstat (limited to 'decoders/rfm12/pd.py')
0 files changed, 0 insertions, 0 deletions