X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decode.c;h=d4890682e681c9e2dc72ad547c1fa0f9247d2a03;hp=bc4b531040188b4df69e1cf4c2789df6739ce286;hb=c11d3c15af2e3ebd04af9326a5f95f9b212f6a8d;hpb=1c6fa20f549c0565ce4fae6ddf7d5eb60db2ddea diff --git a/decode.c b/decode.c index bc4b531..d489068 100644 --- a/decode.c +++ b/decode.c @@ -32,7 +32,12 @@ int sigrokdecode_init(void) Py_Initialize(); /* FIXME */ - PySys_SetPath("decode/scripts"); + /* Allows for ./gui/sigrok-gui in the top-level directory. */ + PySys_SetPath("libsigrokdecode/scripts"); + /* Allows for ./sigrok-gui in the gui/ directory. */ + // PySys_SetPath("../libsigrokdecode/scripts"); + /* Allows for sigrok-gui from anywhere given sigrok is installed. */ + // PySys_SetPath("/usr/local/share/sigrok"); return 0; } @@ -45,6 +50,9 @@ int sigrokdecode_init(void) */ int sigrokdecode_load_decoder_file(const char *name) { + /* QUICK HACK */ + name = name; + /* TODO */ return 0; } @@ -63,7 +71,8 @@ int sigrokdecode_run_decoder(const char *decodername, uint8_t *inbuf, uint64_t inbuflen, uint8_t **outbuf, uint64_t *outbuflen) { - const char *decoder_filename = "transitioncounter"; /* FIXME */ + // const char *decoder_filename = "transitioncounter"; /* FIXME */ + const char *decoder_filename = "i2c"; /* FIXME */ PyObject *py_name, *py_module, *py_func, *py_args; PyObject *py_value, *py_result; int ret;