Skip to content

Commit

Permalink
fix: mc2 mixer protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
mint-dewit committed Nov 17, 2020
1 parent e4e427a commit 0602048
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
4 changes: 4 additions & 0 deletions client/assets/css/Channel.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
flex-direction: column;
align-items: center;
}
.channel-body > .channel-props {
display: flex;
flex-direction: column;
}
.channel-body > .channel-props,
.channel-body > .out-control,
.channel-body > .channel-control {
Expand Down
6 changes: 5 additions & 1 deletion server/constants/mixerProtocols/LawoMC2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export const LawoMC2: IMixerProtocol = {
min: -128,
max: 12,
zero: 0,
maxLabel: 12,
minLabel: -128,
},
],
CHANNEL_INPUT_SELECTOR: [
Expand Down Expand Up @@ -109,12 +111,14 @@ export const LawoMC2: IMixerProtocol = {
CHANNEL_INPUT_GAIN: [
{
mixerMessage:
'Channels.Inputs.${channel}.Signal Processing.Input Mixer.Input Gain',
'Channels.Inputs.${channel}.Signal Processing.Digital Amplifier.DigiAmp Level',
value: 0,
type: 'int',
min: -128,
max: 12,
zero: 0,
maxLabel: 12,
minLabel: -128,
},
],
CHANNEL_INPUT_SELECTOR: [
Expand Down
13 changes: 9 additions & 4 deletions server/utils/mixerConnections/EmberMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export class EmberMixerConnection {
store.dispatch(
storeSetPfl(
channel.assignedFader,
(node.contents as Model.Parameter).value !== 0
(node.contents as Model.Parameter).value as boolean
)
)
global.mainThreadHandler.updatePartialStore(
Expand Down Expand Up @@ -481,9 +481,12 @@ export class EmberMixerConnection {
storeCapability(
channel.assignedFader,
'hasInputSelector',
(node.contents as Model.Parameter).value === 1
(node.contents as Model.Parameter).value as boolean
)
)
global.mainThreadHandler.updatePartialStore(
channel.assignedFader
)
}
)
// subscribe to input selectors
Expand Down Expand Up @@ -561,7 +564,9 @@ export class EmberMixerConnection {
storeCapability(
channel.assignedFader,
'hasAMix',
(node.contents as Model.Parameter).value !== 15 // 15 is no unassigned
(node.contents as Model.Parameter).value !==
((node.contents as Model.Parameter).maximum ||
63) // max is unassigned, max = 63 in firmware 6.4
)
)
global.mainThreadHandler.updatePartialStore(
Expand All @@ -585,7 +590,7 @@ export class EmberMixerConnection {
store.dispatch(
storeSetAMix(
channel.assignedFader,
(node.contents as Model.Parameter).value === 1
(node.contents as Model.Parameter).value as boolean
)
)
global.mainThreadHandler.updatePartialStore(
Expand Down

0 comments on commit 0602048

Please sign in to comment.