This commit is contained in:
赵鑫 2022-09-05 11:56:18 +08:00
parent cc010c477c
commit 55243699fd

View File

@ -65,12 +65,12 @@ io.on('connection', (client) => {
sensehat.led.clear(color)
io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
break
// case 'flash':
// if (color == undefined) color = [255, 255, 255]
// sensehat.led.clear(color)
// setTimeout(sensehat.led.clear, delay | 200)
// client.emit('action', { action: 'clear' })
// break
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 })
break
// case 'getPixel':
// color = sensehat.led.getPixel(x, y)
// client.emit('action', { action: 'setPixel', x, y, color })