update
This commit is contained in:
parent
4fcf068c51
commit
03a15cdb60
@ -108,13 +108,13 @@ io.on('connection', (client) => {
|
|||||||
var r = (Number(sensehat.led.rotation) + 90) % 360
|
var r = (Number(sensehat.led.rotation) + 90) % 360
|
||||||
sensehat.led.rotation = r
|
sensehat.led.rotation = r
|
||||||
sensehat.led.setRotation(r)
|
sensehat.led.setRotation(r)
|
||||||
// io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
|
io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
|
||||||
break
|
break
|
||||||
case 'turnRight':
|
case 'turnRight':
|
||||||
var r = (Number(sensehat.led.rotation) + 360 - 90) % 360
|
var r = (Number(sensehat.led.rotation) + 360 - 90) % 360
|
||||||
sensehat.led.rotation = r
|
sensehat.led.rotation = r
|
||||||
sensehat.led.setRotation(r)
|
sensehat.led.setRotation(r)
|
||||||
// io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
|
io.emit('action', { action: 'setPixels', pixels: sensehat.led.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