From 316501c3fa742085a66bed86c454c11023ad9bff Mon Sep 17 00:00:00 2001 From: olzzon Date: Thu, 7 May 2020 21:15:09 +0200 Subject: [PATCH] fix: only allow 9 aux sends pr monitor output - update readme --- README.md | 10 ++-- .../SkaarhojRemoteConnection.ts | 46 ++++--------------- 2 files changed, 15 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 7e3b5197..a3784077 100644 --- a/README.md +++ b/README.md @@ -159,10 +159,12 @@ As NEXT has been implemented, and PFL usually only work on on channel at a time, ## Skaarhoj panels: Skaarhoj in RAW panel mode is supported for rotary buttons including labels. -HWC#1-xx = fader level on Sisyfos -HWC#81-89 = enabled Monitor sends for Aux mix% on fader 1 -HWC#91-99 = enabled Monitor sends for Aux mix% on fader 2 -HWC#91-99 = enabled Monitor sends for Aux mix% on fader 3 + +- HWC#1-xx = fader level on Sisyfos +- HWC#81-89 = enabled Monitor sends for Aux mix% on fader 1 +- HWC#91-99 = enabled Monitor sends for Aux mix% on fader 2 +- HWC#101-109 = enabled Monitor sends for Aux mix% on fader 3 + The monitor sends are the same as those on the Channel Strip. ## Automation Support: diff --git a/server/utils/remoteConnections/SkaarhojRemoteConnection.ts b/server/utils/remoteConnections/SkaarhojRemoteConnection.ts index bea5c8c3..3ee271e5 100644 --- a/server/utils/remoteConnections/SkaarhojRemoteConnection.ts +++ b/server/utils/remoteConnections/SkaarhojRemoteConnection.ts @@ -138,6 +138,9 @@ export class SkaarhojRemoteConnection { handleAuxLevelCommand(command: string, btnNumber: number) { let auxBtnNumber = btnNumber - parseInt((btnNumber / 10).toFixed(0)) * 10 + if (auxBtnNumber > 9) { + return + } let panelNumber = (btnNumber - auxBtnNumber - 70) / 10 let faderIndex = panelNumber - 1 let auxSendIndex = state.faders[0].fader[faderIndex].monitor - 1 @@ -201,14 +204,6 @@ export class SkaarhojRemoteConnection { } updateRemoteFaderState(channelIndex: number, outputLevel: number) { - console.log( - 'Send fader update - ', - 'Channel index : ', - channelIndex, - 'OutputLevel : ', - outputLevel - ) - let formatLevel = (outputLevel * 100).toFixed() let formatLabel = state.faders[0].fader[channelIndex].label || @@ -222,7 +217,7 @@ export class SkaarhojRemoteConnection { formatLabel + '\n' // 32767|||||label - console.log('Sending command to Skaarhoj :', formattetString) + logger.verbose('Sending command to Skaarhoj :' + formattetString) this.clientList.forEach((client) => { client.write(formattetString) }) @@ -235,13 +230,6 @@ export class SkaarhojRemoteConnection { } updateRemoteAuxPanel(panelNumber: number) { - console.log( - 'Updating Aux Panel number ' + - panelNumber + - ' (hwc#' + - String(panelNumber + 80) + - '-x8' - ) let faderIndex = panelNumber - 1 let auxSendIndex = state.faders[0].fader[faderIndex].monitor - 1 if (auxSendIndex < 0) { @@ -249,7 +237,10 @@ export class SkaarhojRemoteConnection { } let hwButton = panelNumber * 10 + 70 + 1 state.channels[0].channel.forEach((ch: any, index: number) => { - if (ch.auxLevel[auxSendIndex] >= 0) { + if ( + ch.auxLevel[auxSendIndex] >= 0 && + hwButton <= panelNumber * 10 + 70 + 9 + ) { let formatLevel = (ch.auxLevel[auxSendIndex] * 100).toFixed() let formatLabel = state.faders[0].fader[ch.assignedFader].label || @@ -271,25 +262,6 @@ export class SkaarhojRemoteConnection { } updateRemotePgmPstPfl(channelIndex: number) { - /* - if (!this.rawOutput) { - return - } - //Update SELECT button: - this.rawOutput.sendControlChange(12, channelIndex, 1) - this.rawOutput.sendControlChange( - 44, - 1 + 64 * (state.faders[0].fader[channelIndex].pgmOn ? 1 : 0), - 1 - ) - - //Update SOLO button: - this.rawOutput.sendControlChange(12, channelIndex, 1) - this.rawOutput.sendControlChange( - 44, - 3 + 64 * (state.faders[0].fader[channelIndex].pflOn ? 1 : 0), - 1 - ) - */ + return } }