update
This commit is contained in:
parent
7b86cf88b2
commit
4885029570
@ -63,15 +63,15 @@ io.on('connection', (client) => {
|
||||
case 'clear':
|
||||
if (color == undefined) color = [0, 0, 0]
|
||||
sensehat.led.clear(color)
|
||||
io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
|
||||
io.emit('action', { action: 'clear', color })
|
||||
break
|
||||
case 'flash':
|
||||
if (color == undefined) color = [255, 255, 255]
|
||||
sensehat.led.clear(color)
|
||||
io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
|
||||
io.emit('action', { action: 'clear', color })
|
||||
setTimeout(() => {
|
||||
sensehat.led.clear()
|
||||
io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
|
||||
io.emit('action', { action: 'clear' })
|
||||
}, delay | 200)
|
||||
break
|
||||
// case 'getPixel':
|
||||
|
Loading…
Reference in New Issue
Block a user