Actually pass the required information into the callback function
This commit is contained in:
parent
0b245a00c4
commit
c2f372c7fe
|
@ -143,7 +143,7 @@ intval._stop = function () {
|
||||||
|
|
||||||
intval._pin.micro.unwatch()
|
intval._pin.micro.unwatch()
|
||||||
intval._state.frame.active = false
|
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.
|
* Callback for watching relese switch state changes.
|
||||||
|
@ -257,7 +257,7 @@ intval.setDir = function (val = true) {
|
||||||
|
|
||||||
intval.setExposure = function (val = 0) {
|
intval.setExposure = function (val = 0) {
|
||||||
intval._state.frame.exposure = val
|
intval._state.frame.exposure = val
|
||||||
log.info('setTime', { time : val })
|
log.info('setTime', { exposure : val })
|
||||||
}
|
}
|
||||||
|
|
||||||
intval.setDelay = function (val = 0) {
|
intval.setDelay = function (val = 0) {
|
||||||
|
@ -288,7 +288,7 @@ intval.frame = function (dir = null, time = null, cb = () => {}) {
|
||||||
intval._state.frame.active = true
|
intval._state.frame.active = true
|
||||||
intval._pin.micro.watch(intval._watchMicro)
|
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) {
|
if (dir) {
|
||||||
intval._startFwd()
|
intval._startFwd()
|
||||||
|
|
Loading…
Reference in New Issue