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 4 deletions
Showing only changes of commit 64440f7c1c - Show all commits

View File

@ -66,9 +66,7 @@ intval.init = function () {
forgiveParseErrors: false // [NEW]
}).then(intval._restoreState).catch((err) => {
log.error('init', err)
console.dir(fs.rmdirSync('./state'))
log.warn('Restarting')
return process.exit(1)
return intval._setState()
})
process.on('SIGINT', intval._undeclarePins)
@ -79,7 +77,7 @@ intval._restoreState = function (res) {
//console.dir(res)
storage.getItem('_state', 'test').then(intval._setState).catch((err) => {
intval._setState(undefined)
log.error('init', err)
log.error('_restoreState', err)
})
intval._declarePins()
}
@ -91,6 +89,7 @@ intval._setState = function (data) {
log.info('_setState', 'Restored intval state from disk')
return true
}
log.info('_setState', 'Setting state from defaults')
intval._state = {
frame : {
dir : true, //forward