From 4908ccabcadf91656d8a32d7594b1735ffa2b58f Mon Sep 17 00:00:00 2001 From: mmcw-dev Date: Fri, 20 Oct 2017 20:35:00 -0400 Subject: [PATCH] Use a padding value, instead of subtracting the open variable from the desired exposure. --- lib/intval/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/intval/index.js b/lib/intval/index.js index 26c82be..94b2063 100644 --- a/lib/intval/index.js +++ b/lib/intval/index.js @@ -46,6 +46,7 @@ intval.init = function () { time : 0, //length of frame, in ms delay : 0, //delay before start of frame, in ms open : 250, //delay before pausing frame in open state + pad : 450, expected : 630 //expected length of frame, in ms }, release : { @@ -295,13 +296,13 @@ intval.frame = function (dir = null, time = null) { log.info('frame', 'restarting') intval._state.frame.paused = false intval._startFwd() - }, time - intval._state.frame.open) + }, time + intval._state.frame.pad) } else { setTimeout( () => { log.info('frame', 'restarting') intval._state.frame.paused = false intval._startBwd() - }, time - intval._state.frame.open) + }, time + intval._state.frame.pad) } } }