Actually pass the required information into the callback function

This commit is contained in:
mmcw-dev 2017-10-21 12:23:37 -04:00
parent 0b245a00c4
commit c2f372c7fe
1 changed files with 3 additions and 3 deletions

View File

@ -143,7 +143,7 @@ intval._stop = function () {
intval._pin.micro.unwatch()
intval._state.frame.active = false
if (intval._state.frame.cb) intval._state.frame.cb()
if (intval._state.frame.cb) intval._state.frame.cb(len)
}
/**
* Callback for watching relese switch state changes.
@ -257,7 +257,7 @@ intval.setDir = function (val = true) {
intval.setExposure = function (val = 0) {
intval._state.frame.exposure = val
log.info('setTime', { time : val })
log.info('setTime', { exposure : val })
}
intval.setDelay = function (val = 0) {
@ -288,7 +288,7 @@ intval.frame = function (dir = null, time = null, cb = () => {}) {
intval._state.frame.active = true
intval._pin.micro.watch(intval._watchMicro)
log.info('frame', {dir : dir ? 'forward' : 'backward', time : time})
log.info('frame', {dir : dir ? 'forward' : 'backward', exposure : time})
if (dir) {
intval._startFwd()