From 8f9e733ffe6696d2940bfeba477ad03e67e1c3e7 Mon Sep 17 00:00:00 2001 From: khavinshankar Date: Thu, 7 Sep 2023 15:16:53 +0530 Subject: [PATCH] add a 5s delay --- src/automation/autoDataExtractor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/automation/autoDataExtractor.js b/src/automation/autoDataExtractor.js index ff1476d..0ea0dab 100644 --- a/src/automation/autoDataExtractor.js +++ b/src/automation/autoDataExtractor.js @@ -77,6 +77,9 @@ const extractData = async (camParams, monitorPreset = { x: 0, y: 0, z: 0 }) => { console.log("Moving to coordinates: ", monitorPreset); await CameraUtils.absoluteMove({ camParams, ...monitorPreset }); + // TODO: replace timeout with a better solution + await new Promise((resolve) => setTimeout(resolve, 5000)); + const snapshotUrl = await CameraUtils.getSnapshotUri({ camParams }); const fileName = "image-" + new Date().getTime() + ".jpeg";