-
Notifications
You must be signed in to change notification settings - Fork 8
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
Added ME indicator in PVW and PGM bus #7
base: master
Are you sure you want to change the base?
Conversation
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.
Hi Erick, thanks for your contribution!
I have some comments though before we can merge your work.
*/ | ||
atem.emit('previewBus', source, inTransition); |
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.
Changing the way the data is passed from separate arguments to an one argument object looks nice, but it breaks backwards compatibility though.
I'd suggest to keep the multiple arguments style for now and pass the ME information as a 3rd argument. This way we can release it as a sem-ver minor update. It is possible to release a major update afterwards where we switch to one argument objects but that is for another pull request...
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.
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.
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 |
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 of number
.
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!
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 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
type specifier instead of number
.
*/ | ||
atem.emit('programBus', source); | ||
atem.emit('programBus', { |
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.
For the same reason as the previewBus
event, keep the multiple arguments style for now and pass the ME information as a 2nd argument.
No description provided.