From ffbbb9bd517696ea1264d71c5f92e0f006334070 Mon Sep 17 00:00:00 2001 From: Manuel Pitz Date: Tue, 25 Sep 2018 15:22:50 +0200 Subject: [PATCH] workaround for init function call --- etc/uldaq.conf | 6 ++++-- lib/nodes/uldaq.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/etc/uldaq.conf b/etc/uldaq.conf index 436315139..94c33dabf 100644 --- a/etc/uldaq.conf +++ b/etc/uldaq.conf @@ -1,10 +1,12 @@ nodes = { ul201 = { type = "uldaq" - + interface_type = "usb" in = { + range = "bipolar-10", + input_mode = "single-ended" signals = ( - { name = "ch0", type = "float", channel = 0, range = "bipolar-10" } + { name = "ch0", type = "float", channel = 0, } ) sample_rate = 1000, diff --git a/lib/nodes/uldaq.c b/lib/nodes/uldaq.c index 4874f2ed5..14c7f06eb 100644 --- a/lib/nodes/uldaq.c +++ b/lib/nodes/uldaq.c @@ -309,9 +309,11 @@ int uldaq_start(struct node *n) { struct uldaq *u = (struct uldaq *) n->_vd; + u->in.scan_options = (ScanOption) (SO_DEFAULTIO | SO_CONTINUOUS);//it looks like the init function is not called + unsigned num_devs = ULDAQ_MAX_DEV_COUNT; DaqDeviceDescriptor descriptors[num_devs]; - ScanStatus status; + ScanStatus status; TransferStatus transfer_status; UlError err;