Skip to content

Commit

Permalink
add missing update of reference time when doing ltp merges
Browse files Browse the repository at this point in the history
  • Loading branch information
mutec committed Mar 11, 2024
1 parent 3e1601b commit 569082c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/receiver/ltp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ export class LTPMergingReceiver extends AbstractMergingReceiver {
const mergedData = new DMXUniverse();

for (let ch = 0; ch < 512; ch += 1) {
const referenceTime = 0;
let referenceTime = 0;
mergedData.data[ch] = referenceData.data[ch] || 0;

for (const [, tmp] of data.universeData.servers) {
if (tmp.lastUpdate > referenceTime) {
referenceTime = tmp.lastUpdate;
mergedData.data[ch] =
tmp.data.data[ch] || (mergedData.data[ch] as number);
}
Expand Down

0 comments on commit 569082c

Please sign in to comment.