Potential fix, which prevents priming from happening after a determined interval
This commit is contained in:
parent
01f17830f8
commit
b01a9e4483
|
@ -239,10 +239,11 @@ intval._watchMicro = function (err, val) {
|
||||||
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) {
|
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 && (now - intval._state.frame.start) > intval._frame.open) {
|
if (intval._state.micro.primed && !intval._state.micro.paused && (now - intval._state.frame.start) > intval._frame.open) {
|
||||||
|
|
Loading…
Reference in New Issue