Push dev work to master #2

Merged
sixteenmillimeter merged 416 commits from dev into master 2018-07-19 15:29:02 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 0b245a00c4 - Show all commits

View File

@ -121,11 +121,10 @@ function rDelay (req, res, next) {
function rFrame (req, res, next) {
log.info('/frame', { method : req.method })
intval.frame(true, 0, () => {
log.info('frame stopped')
intval.frame(true, 0, (dir, len) => {
res.send({ dir : true, len : len})
return next()
})
res.send({})
return next()
}
function rStatus (req, res, next) {

View File

@ -297,7 +297,6 @@ intval.frame = function (dir = null, time = null, cb = () => {}) {
}
if (time !== 0) {
intval._state.frame.paused = true
if (dir) {
setTimeout(intval._pause, intval._frame.open)
//log.info('frame', { pausing : time + intval._frame.open })
@ -314,7 +313,9 @@ intval.frame = function (dir = null, time = null, cb = () => {}) {
}, time + intval._frame.closed)
}
}
intval._state.frame.cb = cb
intval._state.frame.cb = (len) => {
cb(dir, len)
}
}
/**
* Start a sequence of frames, using defaults or explicit instructions