diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2013-08-09 19:19:00 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2013-09-02 09:05:02 +0200 |
commit | 2d3f496e293b85a1f702355bf7fd275ae2f31455 (patch) | |
tree | aae2bbb11767bb1f254366b863099f86503554c7 /decoders/pan1321 | |
parent | 72a6cad40c4df6e5e45216cd5f77d1b195168359 (diff) | |
download | libsigrokdecode-2d3f496e293b85a1f702355bf7fd275ae2f31455.tar.gz libsigrokdecode-2d3f496e293b85a1f702355bf7fd275ae2f31455.zip |
pan1321: Add support for JAAC.
Diffstat (limited to 'decoders/pan1321')
-rw-r--r-- | decoders/pan1321/pd.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/decoders/pan1321/pd.py b/decoders/pan1321/pd.py index 96d4385..7e3774e 100644 --- a/decoders/pan1321/pd.py +++ b/decoders/pan1321/pd.py @@ -59,7 +59,16 @@ class Decoder(srd.Decoder): self.put(self.ss_block, self.es_block, self.out_ann, data) def handle_host_command(self, rxtx, s): - if s.startswith('AT+JPRO'): + if s.startswith('AT+JAAC'): + # AT+JAAC=x (x can be 0 or 1) + p = s[s.find('=') + 1:] + if p not in ('0', '1'): + self.putx([2, ['Warning: Invalid JAAC parameter "%s"' % p]]) + return + x = 'Auto' if (p == '1') else 'Don\'t auto' + self.putx([0, ['%s-accept new connections' % x]]) + self.putx([1, ['%s-accept connections' % x]]) + elif s.startswith('AT+JPRO'): p = s[s.find('=') + 1:] if p not in ('0', '1'): self.putx([2, ['Warning: Invalid JPRO parameter "%s"' % p]]) |