X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=inline;f=decoders%2Frc_encode%2Fpd.py;h=b57c0adec4ec655622a1a166a0df843b78549b88;hb=e7b18ee369eb1fd1bf02639fd23de3657683d12b;hp=902594c80da09d2cabe9e2aaed26cda4c022ba1c;hpb=8c8cb5917e7bf029042f2161673b3cef3c2a6835;p=libsigrokdecode.git diff --git a/decoders/rc_encode/pd.py b/decoders/rc_encode/pd.py index 902594c..b57c0ad 100644 --- a/decoders/rc_encode/pd.py +++ b/decoders/rc_encode/pd.py @@ -53,20 +53,19 @@ def decode_model(model, bits): if model == 'maplin_l95ar': address = 'Addr' # Address pins A0 to A5 for i in range(0, 6): - address = address + ' %i:' % (i + 1) + \ - ('on' if bits[i][0] == '0' else 'off') + address += ' %i:' % (i + 1) + ('on' if bits[i][0] == '0' else 'off') button = 'Button' # Button pins A6/D5 to A11/D0 if bits[6][0] == '0' and bits[11][0] == '0': - button = button + ' A ON/OFF' + button += ' A ON/OFF' elif bits[7][0] == '0' and bits[11][0] == '0': - button = button + ' B ON/OFF' + button += ' B ON/OFF' elif bits[9][0] == '0' and bits[11][0] == '0': - button = button + ' C ON/OFF' + button += ' C ON/OFF' elif bits[8][0] == '0' and bits[11][0] == '0': - button = button + ' D ON/OFF' + button += ' D ON/OFF' else: - button = button + ' Unknown' + button += ' Unknown' return ['%s' % address, bits[0][1], bits[5][2], \ '%s' % button, bits[6][1], bits[11][2]]