Use a padding value, instead of subtracting the open variable from the desired exposure.

This commit is contained in:
mmcw-dev 2017-10-20 20:35:00 -04:00
parent c95af1693f
commit 4908ccabca
1 changed files with 3 additions and 2 deletions

View File

@ -46,6 +46,7 @@ intval.init = function () {
time : 0, //length of frame, in ms time : 0, //length of frame, in ms
delay : 0, //delay before start of frame, in ms delay : 0, //delay before start of frame, in ms
open : 250, //delay before pausing frame in open state open : 250, //delay before pausing frame in open state
pad : 450,
expected : 630 //expected length of frame, in ms expected : 630 //expected length of frame, in ms
}, },
release : { release : {
@ -295,13 +296,13 @@ intval.frame = function (dir = null, time = null) {
log.info('frame', 'restarting') log.info('frame', 'restarting')
intval._state.frame.paused = false intval._state.frame.paused = false
intval._startFwd() intval._startFwd()
}, time - intval._state.frame.open) }, time + intval._state.frame.pad)
} else { } else {
setTimeout( () => { setTimeout( () => {
log.info('frame', 'restarting') log.info('frame', 'restarting')
intval._state.frame.paused = false intval._state.frame.paused = false
intval._startBwd() intval._startBwd()
}, time - intval._state.frame.open) }, time + intval._state.frame.pad)
} }
} }
} }