Age | Commit message (Collapse) | Author |
|
Only emit sound samplerate information when an input stream sample rate
was specified. Cope with the absence of a sample rate for the input
stream. Decoding is still possible, it's just that no timing information
is available.
|
|
Move initialization code of protocol decoders from the constructor to a
new reset() helper method. The libsigrokdecode backend could run this
method several times to clear the decoder's internal state, before new
data from another acquisition gets fed to decode() calls.
|
|
Using the format string 'I' with the default (implied) prefix '@'
results in both word size and endianness being platform dependent.
In this case standard size (32 bits) and little endianness is
required, so the prefix '<' needs to be used.
|
|
|
|
|
|
Remove the FSF postal address as it might change (it did in the past).
Reference the gnu.org website instead which is more stable.
|
|
|
|
The previous **kwargs some PDs had is not actually ever used, so drop it.
|
|
|
|
This is more consistent with annotation syntax and looks slightly
better in most cases.
|
|
Use self.ss/self.es, or if there's a need to differentiate
them a bit more, use self.ss_<suffix>/self.es_<suffix> consistently.
Also, drop some unused variables.
|
|
- No newlines at the end of files.
- No trailing ';' characters.
- Comparison with None: Use 'is None' or 'is not None'.
- Comparison with True/False: Use 'if cond:' or 'if not cond:'.
- Various minor whitespace fixes.
|
|
Also, use the "if not self.samplerate" form, which catches both the case
where self.samplerate is None, as well as the case where it is 0.
|
|
Older libsigrokdecode versions are no longer able to use the current
versions of the PDs (various changes in syntax etc).
|
|
Variables of type 'struct srd_channel *' are consistently named 'pdch' to
make them easily distinguishable from libsigrok's 'struct sr_channel *'
variables that are consistently named 'ch'.
|
|
Annotation entries also consist of a tuple, not a list.
|
|
|
|
The output type is now called OUTPUT_PYTHON, adapt all PDs to that.
|
|
The single comment re-stating the PD's name / description / purpose in
each pd.py file is not really needed, that info is available in the
Decoder class' attributes already.
|
|
The functionality of the preliminary 'i2s_dump' PD is now available
in the proper 'i2s' PD, via the OUTPUT_BINARY mechanism that frontends
can use to dump decoded data (in various formats) to a file, or pipe it
into other applications, and so on.
Old sigrok-cli example usage:
$ sigrok-cli -i 2ch-16bit-16khz.sr \
-P i2s:sck=0:ws=1:sd=2,i2s_dump:filename=foo.wav
$ aplay foo.wav
New sigrok-cli example usage:
$ sigrok-cli -i 2ch-16bit-16khz.sr \
-P i2s:sck=0:ws=1:sd=2 -B i2s=wav > foo.wav
$ aplay foo.wav
New sigrok-cli example usage (piping into other applications):
$ sigrok-cli -i 2ch-16bit-16khz.sr \
-P i2s:sck=0:ws=1:sd=2 -B i2s=wav | aplay -
|
|
|
|
|
|
|
|
This better reflects what it is: a python object generated and
processed by python code.
|
|
|
|
This fixes (the remaining parts of) bug #162.
|
|
|
|
|
|
This fixes parts of bug #162.
|
|
|
|
|
|
The Python module name is determined by the directory name (e.g. dcf77),
the *.py file names in that directory don't matter and can be kept
consistent.
|