Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erickpece
Copy link

No description provided.

Copy link
Owner

@Dev1an Dev1an left a 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);
Copy link
Owner

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...

Copy link
Author

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
Copy link
Owner

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.

Copy link
Author

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
Copy link
Owner

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', {
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants