Remove some logging, clean up others
This commit is contained in:
parent
638530d2b2
commit
df106e6e90
|
@ -140,7 +140,7 @@ intval._stop = function () {
|
|||
const now = +new Date()
|
||||
const len = now - intval._state.frame.start
|
||||
|
||||
log.info(`Frame stopped ${len}ms`)
|
||||
log.info(`_stop`, { frame : len })
|
||||
|
||||
intval._pin.micro.unwatch()
|
||||
intval._state.frame.active = false
|
||||
|
@ -166,13 +166,13 @@ 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) {
|
||||
if (!intval._state.micro.primed) {
|
||||
intval._state.micro.primed = true
|
||||
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) {
|
||||
if (intval._state.micro.primed && !intval._state.micro.paused) {
|
||||
|
|
Loading…
Reference in New Issue