Push dev work to master #2
|
@ -236,11 +236,10 @@ intval._watchMicro = function (err, val) {
|
||||||
if (err) {
|
if (err) {
|
||||||
log.error('_watchMicro', err)
|
log.error('_watchMicro', err)
|
||||||
}
|
}
|
||||||
log.info(`Microswitch val: ${val}`)
|
//log.info(`Microswitch val: ${val}`)
|
||||||
//determine when to stop
|
//determine when to stop
|
||||||
if (val === 0 && intval._state.frame.active) {
|
if (val === 0 && intval._state.frame.active) {
|
||||||
//&& (now - intval._state.frame.start) > 100
|
if (!intval._state.micro.primed && (now - intval._state.frame.start) > 100) {
|
||||||
if (!intval._state.micro.primed) {
|
|
||||||
intval._state.micro.primed = true
|
intval._state.micro.primed = true
|
||||||
intval._state.micro.time = now
|
intval._state.micro.time = now
|
||||||
log.info('Microswitch primed to stop motor')
|
log.info('Microswitch primed to stop motor')
|
||||||
|
@ -375,7 +374,6 @@ intval.frame = function (dir = null, exposure = null, cb = () => {}) {
|
||||||
|
|
||||||
log.info('frame', {dir : dir ? 'forward' : 'backward', exposure : exposure})
|
log.info('frame', {dir : dir ? 'forward' : 'backward', exposure : exposure})
|
||||||
|
|
||||||
intval._pause()
|
|
||||||
if (dir) {
|
if (dir) {
|
||||||
intval._startFwd()
|
intval._startFwd()
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue