From 0d630bb9bd70b5ef2a27f1a8e1d58469fc1d8a1e Mon Sep 17 00:00:00 2001 From: olzzon Date: Thu, 27 Jun 2019 21:10:01 +0200 Subject: [PATCH] fix: new channelType - emberMixerConnection, subscription used ch instead og channelTypeIndex --- src/utils/EmberMixerConnection.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/EmberMixerConnection.ts b/src/utils/EmberMixerConnection.ts index 19a0fb42..6769d471 100644 --- a/src/utils/EmberMixerConnection.ts +++ b/src/utils/EmberMixerConnection.ts @@ -55,7 +55,7 @@ export class EmberMixerConnection { let ch: number = 1; this.store.settings[0].numberOfChannelsInType.forEach((numberOfChannels, typeIndex) => { for (let channelTypeIndex=0; channelTypeIndex < numberOfChannels ; channelTypeIndex++) { - this.subscribeFaderLevel(ch, typeIndex); + this.subscribeFaderLevel(ch, typeIndex, channelTypeIndex); ch++; } }) @@ -97,8 +97,8 @@ export class EmberMixerConnection { } } - subscribeFaderLevel(ch: number, typeIndex: number) { - this.emberConnection.getNodeByPath(this.mixerProtocol.channelTypes[typeIndex].fromMixer.CHANNEL_FADER_LEVEL[0].replace("{channel}", String(ch))) + subscribeFaderLevel(ch: number, typeIndex: number, channelTypeIndex: number) { + this.emberConnection.getNodeByPath(this.mixerProtocol.channelTypes[typeIndex].fromMixer.CHANNEL_FADER_LEVEL[0].replace("{channel}", String(channelTypeIndex+1))) .then((node: any) => { console.log("Subscribing to channel :", ch); this.emberConnection.subscribe(node, (() => {