This commit is contained in:
赵鑫 2022-09-05 11:59:45 +08:00
parent 55243699fd
commit 6deb1d9047

View File

@ -68,8 +68,11 @@ io.on('connection', (client) => {
case 'flash':
if (color == undefined) color = [255, 255, 255]
sensehat.led.clear(color)
setTimeout(sensehat.led.clear, delay | 200)
client.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
setTimeout(() => {
sensehat.led.clear()
client.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
}, delay | 200)
break
// case 'getPixel':
// color = sensehat.led.getPixel(x, y)