Skip to content

Commit

Permalink
Update sacnUniverse.ts
Browse files Browse the repository at this point in the history
Added fixes for sACN color issue (buffer size)
  • Loading branch information
jlg89 authored Oct 2, 2023
1 parent f8565d7 commit 04d2cd8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/sacnUniverse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ export class SacnUniverse {
this.sacnClient = new Client('localhost');
}

// Create packets to support a full universe of 512
this.sacnPacket = this.sacnClient.createPacket(512);
// Create packets. The buffer size should match the number of pixels needed (8 * 3 = 24) so use the channel count.
// If the pixel is white only, then the buffer size should equal 1 for each light.
this.sacnPacket = this.sacnClient.createPacket(channelCount);
this.sacnPacket.setSourceName('DMXLightPlugin');
this.sacnPacket.setUniverse(universe);
this.sacnSlotsData = this.sacnPacket.getSlotsData();
Expand All @@ -34,6 +35,6 @@ export class SacnUniverse {
this.transitionEffect = transitionEffect.toLocaleLowerCase();
this.transitionEffectDuration = transitionEffectDuration;

log.info('Initialized new SACN Universe #' + universe);
log.info('Initialized new SACN Universe #' + universe + ' with ' + channelCount + ' channel(s)');
}
}
}

0 comments on commit 04d2cd8

Please sign in to comment.