diff options
author | Gerhard Sittig <gerhard.sittig@gmx.net> | 2019-11-24 19:45:01 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2019-11-24 20:41:54 +0100 |
commit | d21d2b792df22f43e3c71037fed0ee4096c763b1 (patch) | |
tree | 0e717bba2c4dc4f2ae9977d76d0a97765aaba523 /decoders/gpib | |
parent | 99e264892acc0d81b31a219d806a5e5c5efa46f8 (diff) | |
download | libsigrokdecode-d21d2b792df22f43e3c71037fed0ee4096c763b1.tar.gz libsigrokdecode-d21d2b792df22f43e3c71037fed0ee4096c763b1.zip |
gpib: drop obscure "total number of samples" option
The gpib decoder tried to "flush" input data at a user specified sample
number when the input data lacked the respective edge which triggers the
processing during regular operation.
This is rather obscure a feature, not seen in any other decoder, perhaps
a workaround for bug #292, rather unaccessible to users (units of sample
numbers not times nor automatic detection of the EOF condition), highly
confusing according to user reports, and not covered by existing tests.
The mere presence of this option caused severe issues in application
code (see bug #1444). While there is no apparent fix that won't affect
other decoders. So let's drop this questionable feature. Valid and
complete captures should contain all relevent edges and thus decode
properly.
Diffstat (limited to 'decoders/gpib')
-rw-r--r-- | decoders/gpib/pd.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/decoders/gpib/pd.py b/decoders/gpib/pd.py index a7c9c73..f3497f4 100644 --- a/decoders/gpib/pd.py +++ b/decoders/gpib/pd.py @@ -47,9 +47,6 @@ class Decoder(srd.Decoder): {'id': 'atn', 'name': 'ATN', 'desc': 'Attention'}, {'id': 'ren', 'name': 'REN', 'desc': 'Remote enable'}, ) - options = ( - {'id': 'sample_total', 'desc': 'Total number of samples', 'default': 0}, - ) annotations = ( ('items', 'Items'), ('gpib', 'DAT/CMD'), @@ -166,15 +163,9 @@ class Decoder(srd.Decoder): # Inspect samples at falling edge of DAV. But make sure to also # start inspection when the capture happens to start with low - # DAV level. Optionally enforce processing when a user specified - # sample number was reached. + # DAV level. waitcond = [{9: 'l'}] - lsn = self.options['sample_total'] - if lsn: - waitcond.append({'skip': lsn}) while True: - if lsn: - waitcond[1]['skip'] = lsn - self.samplenum - 1 pins = self.wait(waitcond) self.handle_bits(pins) waitcond[0][9] = 'f' |