diff --git a/lib/intval/index.js b/lib/intval/index.js index 8c77ce1..a4a641e 100644 --- a/lib/intval/index.js +++ b/lib/intval/index.js @@ -122,7 +122,6 @@ intval._startBwd = function () { intval._pause = function () { intval._pin.fwd.writeSync(0) intval._pin.fwd.writeSync(0) - intval._state.micro.paused = true } /** * Stop motor by setting both motor pins to 0 (LOW) @@ -288,6 +287,7 @@ intval.frame = function (dir = null, time = null) { intval._startBwd() } if (time !== 0) { + intval._state.micro.paused = true setTimeout(intval._pause, intval._state.frame.open) if (dir) { log.info('frame', { pausing : time - intval._state.frame.open })