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 9 additions and 1 deletions
Showing only changes of commit 8ec1694b02 - Show all commits

View File

@ -54,6 +54,7 @@ function createBLE () {
ble.on('delay', bDelay) ble.on('delay', bDelay)
ble.on('counter', bCounter) ble.on('counter', bCounter)
ble.on('sequence', bSequence) ble.on('sequence', bSequence)
ble.on('stop', bSequenceStop)
ble.on('reset', bReset) ble.on('reset', bReset)
} }
@ -465,6 +466,7 @@ function bSequence (obj, cb) {
} }
} }
if (intval._state.sequence && sequence._state.active) { if (intval._state.sequence && sequence._state.active) {
//should not occur with single client
sequence.setStop() sequence.setStop()
intval._state.sequence = false intval._state.sequence = false
log.info('sequence stop', { method : 'ble' }) log.info('sequence stop', { method : 'ble' })
@ -493,7 +495,13 @@ function bSequence (obj, cb) {
} }
function bSequenceStop (obj, cb) { function bSequenceStop (obj, cb) {
//
if (intval._state.sequence && sequence._state.active) {
sequence.setStop()
intval._state.sequence = false
log.info('sequence stop', { method : 'ble' })
return cb()
}
} }
function bReset (obj, cb) { function bReset (obj, cb) {