-
Notifications
You must be signed in to change notification settings - Fork 8
Added ME indicator in PVW and PGM bus #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -753,28 +753,40 @@ function Device(atemIpAddress){ | |
}); | ||
|
||
this.on('PrvI', function(d) { | ||
const source = d.readUInt16BE(2), | ||
const me = d.readUInt8(0); | ||
const source = d.readUInt16BE(2) | ||
inTransition = (d[4] & 1) === 1; | ||
|
||
/** | ||
* When the selected preview bus changes this event will be fired. | ||
* @event Device#previewBus | ||
* @property {SourceID} source The new preview source | ||
* @property {number} me 0 for M/E 1, 1 for M/E 2 | ||
* @property {number} source The new preview source | ||
* @property {boolean} inTransition Is this currently dissolving? | ||
*/ | ||
atem.emit('previewBus', source, inTransition); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changing the way the data is passed from separate arguments to an one argument object looks nice, but it breaks backwards compatibility though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is true, but you could also argue that since you're still in major version zero, the API isn't set in stone anyway. That being said, I can also respect your desire to keep it stable even in version zero. Also, since it's your repository, that's your call! I'd be happy to change it to pass the ME information as a 3rd argument if you'd prefer. |
||
atem.emit('previewBus', { | ||
me, | ||
source, | ||
inTransition | ||
}); | ||
|
||
// todo inspect the other bytes in PrvI | ||
}); | ||
|
||
this.on('PrgI', function(d) { | ||
const me = d.readUInt8(0); | ||
const source = d.readUInt16BE(2); | ||
|
||
/** | ||
* When the selected program bus changes this event will be fired. | ||
* @event Device#programBus | ||
* @property {SourceID} source The new program source | ||
* @property {number} me 0 for M/E 1, 1 for M/E 2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did the numbering of sources change? If yes: please elaborate on the new numbering structure, if not: please use the |
||
* @property {number} source The new program source | ||
*/ | ||
atem.emit('programBus', source); | ||
atem.emit('programBus', { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the same reason as the |
||
me, | ||
source | ||
}); | ||
// todo inspect the other bytes in PrgI | ||
}); | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the numbering of sources change? If yes: please elaborate on the new numbering structure, if not: please use the
SourceID
instead ofnumber
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My apologies - no reason for me to have changed this!