aboutsummaryrefslogtreecommitdiffhomepage
path: root/artnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'artnet.c')
-rw-r--r--artnet.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/artnet.c b/artnet.c
index 1fe8fb2..2684d46 100644
--- a/artnet.c
+++ b/artnet.c
@@ -80,9 +80,12 @@ static int artnet_configure_instance(instance* instance, char* option, char* val
}
static channel* artnet_channel(instance* instance, char* spec){
- fprintf(stderr, "Parsing ArtNet channelspec %s\n", spec);
- //TODO
- return NULL;
+ unsigned channel = strtoul(spec, NULL, 10);
+ if(channel > 512 || channel < 1){
+ fprintf(stderr, "Invalid ArtNet channel %s\n", spec);
+ return NULL;
+ }
+ return mm_channel(instance, channel);
}
static int artnet_set(size_t num, channel* c, channel_value* v){