Remove some logging, clean up others

This commit is contained in:
mmcw-dev 2017-10-20 21:10:01 -04:00
parent 638530d2b2
commit df106e6e90
1 changed files with 3 additions and 3 deletions

View File

@ -140,7 +140,7 @@ intval._stop = function () {
const now = +new Date() const now = +new Date()
const len = now - intval._state.frame.start const len = now - intval._state.frame.start
log.info(`Frame stopped ${len}ms`) log.info(`_stop`, { frame : len })
intval._pin.micro.unwatch() intval._pin.micro.unwatch()
intval._state.frame.active = false intval._state.frame.active = false
@ -166,13 +166,13 @@ 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) {
if (!intval._state.micro.primed) { 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')
} }
} else if (val === 1 && intval._state.frame.active) { } else if (val === 1 && intval._state.frame.active) {
if (intval._state.micro.primed && !intval._state.micro.paused) { if (intval._state.micro.primed && !intval._state.micro.paused) {