let the door-open return fast

This commit is contained in:
Will Bradley 2018-09-01 16:28:31 -07:00
parent fcd9545890
commit bee518e1ef
No known key found for this signature in database
GPG Key ID: 42BAE225DDDB7093

View File

@ -7,12 +7,12 @@ module.exports = class Door {
return new Promise(success => {
console.log('OPEN DOOR!')
const board = new Board(2)
success(board.allOn())
setTimeout(() => {
console.log('CLOSING DOOR!')
board.allOff()
success()
}, DELAY)
return board.allOn()
})
}