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