Skip to content

Commit

Permalink
feat: Skaarhoj - abstract remote controllers for other support that HUI
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon authored and olzzon committed May 2, 2020
1 parent 52c429d commit ee6384e
Show file tree
Hide file tree
Showing 9 changed files with 1,957 additions and 1,847 deletions.
8 changes: 4 additions & 4 deletions server/mainClasses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ import {
} from './constants/MixerProtocolPresets'
import { MixerGenericConnection } from './utils/MixerConnection'
import { AutomationConnection } from './utils/AutomationConnection'
import { HuiMidiRemoteConnection } from './utils/HuiMidiRemoteConnection'
import { RemoteConnection } from './utils/RemoteConnection'

import { state } from './reducers/store'
let mixerProtocolPresets = MixerProtocolPresets
let mixerProtocolList = MixerProtocolList

let mixerGenericConnection = new MixerGenericConnection()
let automationConnection = new AutomationConnection()
let huiRemoteConnection: HuiMidiRemoteConnection | null = null
let remoteConnections: RemoteConnection | null = null
if (state.settings[0].enableRemoteFader) {
huiRemoteConnection = new HuiMidiRemoteConnection()
remoteConnections = new RemoteConnection()
}

export {
mixerProtocolList,
mixerProtocolPresets,
mixerGenericConnection,
automationConnection,
huiRemoteConnection,
remoteConnections,
}
203 changes: 0 additions & 203 deletions server/utils/HuiMidiRemoteConnection.ts

This file was deleted.

6 changes: 3 additions & 3 deletions server/utils/MixerConnection.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { store, state } from '../reducers/store'
import { huiRemoteConnection } from '../mainClasses'
import { remoteConnections } from '../mainClasses'

//Utils:
import { MixerProtocolPresets } from '../constants/MixerProtocolPresets'
Expand Down Expand Up @@ -124,8 +124,8 @@ export class MixerGenericConnection {
}
}
)
if (huiRemoteConnection) {
huiRemoteConnection.updateRemoteFaderState(
if (remoteConnections) {
remoteConnections.updateRemoteFaderState(
faderIndex,
state.faders[0].fader[faderIndex].faderLevel
)
Expand Down
Loading

0 comments on commit ee6384e

Please sign in to comment.