From 4230e8f66c192c2e8b52591745194169173420bf Mon Sep 17 00:00:00 2001 From: danielboe Date: Tue, 26 Nov 2024 10:58:57 +0100 Subject: [PATCH] fix(server) try to wait for pjlink --- app/hwcontrol.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/hwcontrol.js b/app/hwcontrol.js index 89d30dd..7f22fe6 100644 --- a/app/hwcontrol.js +++ b/app/hwcontrol.js @@ -230,7 +230,11 @@ module.exports = { for (let index = 0; index < beamerArray.length; index++) { const element = beamerArray[index]; //await sendSerialProjector("7E3030303020310D", element); //power on optoma - var status = await pjlinkSet(element, "status"); + for (let index = 0; index < 10; index++) { + var status = await pjlinkSet(element, "status"); + if (status != false) break; + delay(2000); + } console.log(status); } resolve(true);