update
This commit is contained in:
parent
efd83b456f
commit
cc010c477c
@ -63,7 +63,7 @@ io.on('connection', (client) => {
|
||||
case 'clear':
|
||||
if (color == undefined) color = [0, 0, 0]
|
||||
sensehat.led.clear(color)
|
||||
io.emit('action', { action: 'setPixels', pixels })
|
||||
io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
|
||||
break
|
||||
// case 'flash':
|
||||
// if (color == undefined) color = [255, 255, 255]
|
||||
@ -81,8 +81,7 @@ io.on('connection', (client) => {
|
||||
// io.emit('action', { action: 'setPixel', x, y, color })
|
||||
// break
|
||||
case 'getPixels':
|
||||
const pixels = sensehat.led.setPixels()
|
||||
io.emit('action', { action: 'setPixels', pixels })
|
||||
io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
|
||||
break
|
||||
// case 'on':
|
||||
// sense.setPixel(Number(x), Number(y), color_blue)
|
||||
|
Loading…
Reference in New Issue
Block a user