Push dev work to master #2
|
@ -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
|
||||||
|
openBwd : 400,
|
||||||
closed : 100, //time that frame actually remains closed for
|
closed : 100, //time that frame actually remains closed for
|
||||||
expected : 630 //expected length of frame, in ms
|
expected : 630 //expected length of frame, in ms
|
||||||
},
|
},
|
||||||
|
@ -294,8 +295,9 @@ intval.frame = function (dir = null, time = null) {
|
||||||
}
|
}
|
||||||
if (time !== 0) {
|
if (time !== 0) {
|
||||||
intval._state.frame.paused = true
|
intval._state.frame.paused = true
|
||||||
setTimeout(intval._pause, intval._state.frame.open)
|
|
||||||
if (dir) {
|
if (dir) {
|
||||||
|
setTimeout(intval._pause, intval._state.frame.open)
|
||||||
//log.info('frame', { pausing : time + intval._state.frame.open })
|
//log.info('frame', { pausing : time + intval._state.frame.open })
|
||||||
setTimeout( () => {
|
setTimeout( () => {
|
||||||
//log.info('frame', 'restarting')
|
//log.info('frame', 'restarting')
|
||||||
|
@ -303,7 +305,7 @@ intval.frame = function (dir = null, time = null) {
|
||||||
intval._startFwd()
|
intval._startFwd()
|
||||||
}, time + intval._state.frame.closed)
|
}, time + intval._state.frame.closed)
|
||||||
} else {
|
} else {
|
||||||
log.info('frame', { pausing : time + intval._state.frame.open })
|
setTimeout(intval._pause, intval._state.frame.openBwd)
|
||||||
setTimeout( () => {
|
setTimeout( () => {
|
||||||
//log.info('frame', 'restarting')
|
//log.info('frame', 'restarting')
|
||||||
intval._state.frame.paused = false
|
intval._state.frame.paused = false
|
||||||
|
|
Loading…
Reference in New Issue