Age | Commit message (Collapse) | Author |
|
|
|
Rename the old MissingDataError to the clearer ChannelError. Also, add
ChannelError in the UART decoder.
|
|
|
|
Python 3.2 doesn't yet have the copy() method for lists:
AttributeError: 'list' object has no attribute 'copy'
|
|
This fixes 'warning: "_POSIX_C_SOURCE" redefined' with some Python
versions.
|
|
|
|
(also fixes the build for libsigrokdecode)
|
|
This fixes bug #378.
|
|
- 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.
|
|
For options which only have a limited set of valid values, we don't need
to check (in the PD) whether a valid value was supplied, since the backend
can do that for us.
|
|
(Consistently use single-quotes for all Python strings everywhere)
|
|
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.
|
|
In all current PDs it is not necessary to raise an exception upon
invalid states (of the PD's state machine), since we can guarantee that
no such invalid state can ever be reached in these PDs.
|
|
|
|
|
|
|
|
|
|
This prevents Python.h from being included into client code, where
it can mess things up by e.g. redefining _POSIX_C_SOURCE.
|
|
runtc.c used to try to include "../config.h". This only works when
building in the source tree, otherwise there is no config.h in the
parent directory of runtc.c. However, the explicit path is
unnecessary since the build directory (whether the same as the source
directory or not) will always be added to the include path.
|
|
srd_decoder_load() works perfectly with decoders stored inside zip files.
However, srd_decoder_load_all{_path,}() did not, because it assumed that
normal directory listings can be used to enumerate decoders, which is not
the case for zipped decoders. Fix this by providing a fallback based on
the zipimporter Python class.
|
|
|
|
|
|
|
|
This is still broken: it needs to properly check the expected type of
the option, not just blindly assume G_VARIANT_TYPE_STRING.
|
|
|
|
|
|
|
|
Also remove some dead code.
|
|
The match value should be the name of the exception thrown, e.g.
AttributeError, IndexError or even a custom exception defined in
the protocol decoder, such as SamplerateError.
|
|
Only the unittests use these flags, so don't go linking them in for
the main library too.
|
|
The == operator is not in POSIX.
|
|
c was of type char, while getopt returns an int. This
caused a compiler warning during build.
|
|
The build of runtc caused issues with make -j as runtc
was attempted to be linked with libsigrokdecode before
libsigrokdecode was linked. Using LDADD to insert
libsigrokdecode ensures that it links before runtc,
ensuring the build completes correctly.
|
|
The current libsigrokdecode build passes the python
CPPFLAGS and LDFLAGS directly into libsigrokdecode.pc.in.
This leads to issues while cross-compiling as while using
PKG_CONFIG_SYSROOT_DIR, there is a chance of the prefix
being duplicated. We now, while detecting the installation
of python (cross or normal), add a dependency for the
module name in the pkgconfig file (from configure.ac).
|
|
|
|
The libtool current:revision:age numbers change from 1:0:0 to 2:0:0.
Details:
http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
This changes the library filename (e.g. on Linux) from
libsigrokdecode.so.1.0.0 to libsigrokdecode.so.2.0.0, the SONAME (+symlink)
becomes libsigrokdecode.so.2.
|
|
|
|
|
|
|
|
Decoders that implement any other PD API version are per definition not
compatible and cannot work with this library version.
|
|
|
|
Sometimes the Python 3 executable is called just 'python3', sometimes
it is called 'python3.4' and so on. Handle all cases transparently for
the user.
Before:
$ make install
/usr/bin/env: python3: No such file or directory
After:
$ make install
python3.4 ./tools/install-decoders -i ./decoders -o [...]
Installing 36 protocol decoders:
[...]
|
|
(mostly copied from libsigrok, which normally has the same conventions)
|
|
|
|
|
|
|
|
This matches the libsigrok conventions, and will be required (or
at least nice to have) for libsigrokdecode language bindings later.
|
|
|
|
The function srd_check_init() is only used in decoder.c.
|
|
|