Push dev work to master #2

Merged
sixteenmillimeter merged 416 commits from dev into master 2018-07-19 15:29:02 +00:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit df106e6e90 - Show all commits

View File

@ -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) {