This commit is contained in:
赵鑫 2022-09-05 13:51:26 +08:00
parent 7cc61365be
commit b37e3c32ab

View File

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