From 569082c3781e46b2f891806136c9a7a5b790b2cd Mon Sep 17 00:00:00 2001 From: mutec Date: Mon, 11 Mar 2024 13:10:44 +0100 Subject: [PATCH] add missing update of reference time when doing ltp merges --- src/receiver/ltp.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/receiver/ltp.ts b/src/receiver/ltp.ts index 6512d2e..86e8eec 100644 --- a/src/receiver/ltp.ts +++ b/src/receiver/ltp.ts @@ -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); }