From db40d02feefd4f2b50b423bfe8dfc8fe4c2f8d28 Mon Sep 17 00:00:00 2001 From: olzzon Date: Tue, 25 Jul 2023 08:32:18 +0200 Subject: [PATCH] feat: rename channel to fader --- .../remoteConnections/SkaarhojRemoteConnection.ts | 14 +++++++------- shared/src/constants/SOCKET_IO_DISPATCHERS.ts | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/server/src/utils/remoteConnections/SkaarhojRemoteConnection.ts b/server/src/utils/remoteConnections/SkaarhojRemoteConnection.ts index 00ee4a13..29ca4967 100644 --- a/server/src/utils/remoteConnections/SkaarhojRemoteConnection.ts +++ b/server/src/utils/remoteConnections/SkaarhojRemoteConnection.ts @@ -95,8 +95,8 @@ export class SkaarhojRemoteConnection { ) let event = command.slice(command.indexOf('=') + 1) if (btnNumber <= state.faders[0].fader.length) { - let channelIndex = btnNumber - 1 - let level = state.faders[0].fader[channelIndex].faderLevel + let faderIndex = btnNumber - 1 + let level = state.faders[0].fader[faderIndex].faderLevel if (event === 'Enc:1') { level += 0.01 if (level > 1) { @@ -119,11 +119,11 @@ export class SkaarhojRemoteConnection { } } //Fader changed: - logger.debug(`Received Fader ${channelIndex + 1} Level : ${level}`) - store.dispatch(storeFaderLevel(channelIndex, level)) - mixerGenericConnection.updateOutLevel(channelIndex, -1) - global.mainThreadHandler.updatePartialStore(channelIndex) - this.updateRemoteFaderState(channelIndex, level) + logger.debug(`Received Fader ${faderIndex + 1} Level : ${level}`) + store.dispatch(storeFaderLevel(faderIndex, level)) + mixerGenericConnection.updateOutLevel(faderIndex, -1) + global.mainThreadHandler.updatePartialStore(faderIndex) + this.updateRemoteFaderState(faderIndex, level) } else if (btnNumber > 80) { this.handleAuxLevelCommand(command, btnNumber) } diff --git a/shared/src/constants/SOCKET_IO_DISPATCHERS.ts b/shared/src/constants/SOCKET_IO_DISPATCHERS.ts index 087d5937..711dd484 100644 --- a/shared/src/constants/SOCKET_IO_DISPATCHERS.ts +++ b/shared/src/constants/SOCKET_IO_DISPATCHERS.ts @@ -10,7 +10,7 @@ export const SOCKET_SET_FADER_MONITOR = 'FaderMonitor' export const SOCKET_SHOW_IN_MINI_MONITOR = 'showInMiniMonitor' export const SOCKET_SET_AUX_LEVEL = 'setAuxLevel' export const SOCKET_SET_INPUT_OPTION = 'setInputOption' -export const SOCKET_SET_FX = 'setHigh' +export const SOCKET_SET_FX = 'setFx' export const SOCKET_TOGGLE_PGM = 'togglePgm' export const SOCKET_TOGGLE_VO = 'toggleVo' export const SOCKET_TOGGLE_SLOW_FADE = 'toggleSlowFade'