Skip to content

Commit

Permalink
feat: lawo-mc - create LawoMC protocol. (not configures yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon authored and olzzon committed Feb 24, 2020
1 parent 54eb20a commit 7d963a5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 102 deletions.
6 changes: 4 additions & 2 deletions server/constants/MixerProtocolPresets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { ReaperMaster } from './mixerProtocols/reaperMaster';
import { BehringerXrMaster } from './mixerProtocols/behringerXrMaster';
import { MidasMaster } from './mixerProtocols/midasMaster';
import { GenericMidi } from './mixerProtocols/genericMidi';
import { LawoClient } from './mixerProtocols/EmberLawo';
import { LawoRelayVrx4 } from './mixerProtocols/LawoRelayVrx4';
import { LawoMC2 } from './mixerProtocols/LawoMC2'
import { CasparCGMaster } from './mixerProtocols/casparCGMaster';
import { DMXIS } from './mixerProtocols/DmxIs';
import { YamahaQLCL } from './mixerProtocols/yamahaQLCL'
Expand All @@ -24,7 +25,8 @@ export const MixerProtocolPresets: { [key: string]: IMixerProtocolGeneric } = Ob
behringerxrmaster: BehringerXrMaster,
midasMaster: MidasMaster,
genericMidi: GenericMidi,
lawoClient: LawoClient,
lawoRelayVrx4: LawoRelayVrx4,
lawoMC2: LawoMC2,
dmxis: DMXIS,
yamahaQlCl: YamahaQLCL,
sslSystemT: SSLSystemT,
Expand Down
97 changes: 0 additions & 97 deletions server/constants/mixerProtocols/EmberLawo.ts

This file was deleted.

10 changes: 7 additions & 3 deletions server/utils/mixerConnections/EmberMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { logger } from '../logger';


export class EmberMixerConnection {
mixerProtocol: IMixerProtocol;
emberConnection: any;
mixerProtocol: IMixerProtocol
emberConnection: EmberClient
deviceRoot: any;
emberNodeObject: Array<any>;

Expand Down Expand Up @@ -111,6 +111,7 @@ export class EmberMixerConnection {
this.emberConnection.getElementByPath(this.mixerProtocol.channelTypes[typeIndex].fromMixer.CHANNEL_OUT_GAIN[0].mixerMessage.replace("{channel}", String(channelTypeIndex+1)))
.then((node: any) => {
this.emberNodeObject[ch-1] = node;
/*
this.emberConnection.subscribe(node, (() => {
if (!state.channels[0].channel[ch-1].fadeActive
&& !state.channels[0].channel[ch - 1].fadeActive
Expand All @@ -127,6 +128,7 @@ export class EmberMixerConnection {
})
)
*/
})
}

Expand Down Expand Up @@ -167,6 +169,7 @@ export class EmberMixerConnection {

/*this.emberConnection.getElementByPath(message)
.then((element: any) => {*/
console.log('Sending out message : ', message )
this.emberConnection.setValue(
this.emberNodeObject[channel-1],
typeof value === 'number' ? value : parseFloat(value)
Expand All @@ -178,9 +181,10 @@ export class EmberMixerConnection {
}

sendOutLevelMessage(channel: number, value: number) {
console.log('Sending out Level : ', this.emberNodeObject[channel])
this.emberConnection.setValue(
this.emberNodeObject[channel-1],
value
Math.round(value)
)
.catch((error: any) => {
console.log("Ember Error ", error)
Expand Down

0 comments on commit 7d963a5

Please sign in to comment.