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