Skip to content

Commit

Permalink
feat: rename channel to fader
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Jul 25, 2023
1 parent 454e3a2 commit db40d02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions server/src/utils/remoteConnections/SkaarhojRemoteConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion shared/src/constants/SOCKET_IO_DISPATCHERS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit db40d02

Please sign in to comment.