diff --git a/etc/uldaq.conf b/etc/uldaq.conf index b04d8ba76..436315139 100644 --- a/etc/uldaq.conf +++ b/etc/uldaq.conf @@ -4,11 +4,11 @@ nodes = { in = { signals = ( - { name = "ch0", channel = 0, range = "bipolar-10" } + { name = "ch0", type = "float", channel = 0, range = "bipolar-10" } ) sample_rate = 1000, vectorize = 100 } } -} \ No newline at end of file +} diff --git a/lib/nodes/uldaq.c b/lib/nodes/uldaq.c index 3612d1b68..afb831dc1 100644 --- a/lib/nodes/uldaq.c +++ b/lib/nodes/uldaq.c @@ -191,6 +191,15 @@ int uldaq_check(struct node *n) return -1; } + for (size_t i = 0; i < list_length(&n->signals); i++) { + struct signal *s = (struct signal *) list_at(&n->signals, i); + + if (s->type != SIGNAL_TYPE_FLOAT) { + warn("Node '%s' only supports signals of type = float!", node_name(n)); + return -1; + } + } + return 0; }