Skip to content

Commit

Permalink
fix: multiview source set command
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Aug 1, 2020
1 parent 2aa7d14 commit 5575e9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/atem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,8 @@ export class Atem extends BasicAtem {
return this.sendCommand(command)
}

public setMultiViewerSource(newProps: Partial<MultiViewerSourceState>, mv = 0): Promise<void> {
const command = new Commands.MultiViewerSourceCommand(mv)
command.updateProps(newProps)
public setMultiViewerSource(newProps: MultiViewerSourceState, mv = 0): Promise<void> {
const command = new Commands.MultiViewerSourceCommand(mv, newProps.windowIndex, newProps.source)
return this.sendCommand(command)
}

Expand Down
8 changes: 4 additions & 4 deletions src/commands/Settings/MultiViewerSourceCommand.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { WritableCommand, DeserializedCommand } from '../CommandBase'
import { BasicWritableCommand, DeserializedCommand } from '../CommandBase'
import { AtemState, AtemStateUtil, InvalidIdError } from '../../state'
import { MultiViewerSourceState } from '../../state/settings'

export class MultiViewerSourceCommand extends WritableCommand<MultiViewerSourceState> {
export class MultiViewerSourceCommand extends BasicWritableCommand<MultiViewerSourceState> {
public static readonly rawName = 'CMvI'

public readonly multiViewerId: number

constructor(multiviewerId: number) {
super()
constructor(multiviewerId: number, windowIndex: number, source: number) {
super({ windowIndex, source })

this.multiViewerId = multiviewerId
}
Expand Down

0 comments on commit 5575e9b

Please sign in to comment.