aboutsummaryrefslogtreecommitdiffhomepage
path: root/artnet.c
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2018-02-27 18:56:13 +0100
committercbdev <cb@cbcdn.com>2018-02-27 18:56:13 +0100
commita16094253ba19f2e7123029eb80fba52b0d192b6 (patch)
tree9570c10e346ad60732ba22ab519c52cc46c0bfb3 /artnet.c
parentd8b4e29c820470bc88f219f1e026a15bb968133d (diff)
downloadmidimonster-a16094253ba19f2e7123029eb80fba52b0d192b6.tar.gz
midimonster-a16094253ba19f2e7123029eb80fba52b0d192b6.tar.bz2
midimonster-a16094253ba19f2e7123029eb80fba52b0d192b6.zip
Implement sACN output
Diffstat (limited to 'artnet.c')
-rw-r--r--artnet.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/artnet.c b/artnet.c
index 5b93c8f..6863861 100644
--- a/artnet.c
+++ b/artnet.c
@@ -291,11 +291,11 @@ static int artnet_set(instance* inst, size_t num, channel** c, channel_value* v)
//FIXME maybe introduce minimum frame interval
for(u = 0; u < num; u++){
if(IS_WIDE(data->data.map[c[u]->ident])){
- uint32_t val = (v[u].normalised * 0xFFFF);
- //test coarse channel
- if(data->data.out[c[u]->ident] != (val >> 8)){
+ uint32_t val = v[u].normalised * ((double) 0xFFFF);
+ //the primary (coarse) channel is the one registered to the core, so we don't have to check for that
+ if(data->data.out[c[u]->ident] != ((val >> 8) & 0xFF)){
mark = 1;
- data->data.out[c[u]->ident] = val >> 8;
+ data->data.out[c[u]->ident] = (val >> 8) & 0xFF;
}
if(data->data.out[MAPPED_CHANNEL(data->data.map[c[u]->ident])] != (val & 0xFF)){