This commit is contained in:
赵鑫 2022-09-05 12:20:16 +08:00
parent 34c73dd988
commit 54841256a8

View File

@ -77,8 +77,8 @@ io.on('connection', (client) => {
break
case 'setPixel':
if (color == undefined) color = [255, 255, 255]
sensehat.led.setPixel(x, y, color)
io.emit('action', { action: 'setPixel', x, y, color })
sensehat.led.setPixel(x, y, [255, 255, 255])
io.emit('action', { action: 'setPixel', x, y, color: [255, 255, 255] })
break
// case 'getPixel':
// color = sensehat.led.getPixel(x, y)