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

Improve Atem source #501

Merged
merged 3 commits into from
Jun 17, 2023
Merged

Improve Atem source #501

merged 3 commits into from
Jun 17, 2023

Conversation

MatteoGheza
Copy link
Collaborator

Fixes #469

Copy link
Collaborator

@hrueger hrueger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks quite good to me 👍
I couldn't test this, though, due to not having much time currently.

@@ -47,7 +47,7 @@ <h2>
</table>
</div>
<div class="alert alert-info mt-3" role="alert" *ngIf="getNetworkDiscoveryList().length > 0">
Found {{ getNetworkDiscoveryList().length }} new sources in your network.
Found {{ getNetworkDiscoveryList().length }} new {{ getNetworkDiscoveryList().length === 1 ? 'source' : 'sources' }} in your network.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recently read that it's bad practice to call functions in an angular template... however, as it was already there, we could probably leave it that way. I just thought I'd mention it since we're now calling that function at least twice as often.

@@ -127,6 +130,9 @@ export class BlackmagicATEMSource extends TallyInput {
}

private processATEMTally(): void {
const areSetsEqual = (a, b) => a.size === b.size && [...a].every(value => b.has(value)); //https://stackoverflow.com/a/44827922
if(areSetsEqual(this.prvList, this.oldPrvList) && areSetsEqual(this.pgmList, this.oldPgmList)) return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this only a problem with the atem source? Maybe it would make sense to do that one level "higher", meaning that TA filters duplicate tally data. Then, we would not have to check for that in each source.

@josephdadams josephdadams merged commit aef55de into master Jun 17, 2023
@josephdadams josephdadams deleted the fix_atem branch June 17, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Transition causes delay on M5 Atom Matrix Listeners when using transition instead of cut
3 participants