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