This commit is contained in:
赵鑫 2022-09-05 14:30:02 +08:00
parent 4fcf068c51
commit 03a15cdb60

View File

@ -108,13 +108,13 @@ io.on('connection', (client) => {
var r = (Number(sensehat.led.rotation) + 90) % 360
sensehat.led.rotation = r
sensehat.led.setRotation(r)
// io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
break
case 'turnRight':
var r = (Number(sensehat.led.rotation) + 360 - 90) % 360
sensehat.led.rotation = r
sensehat.led.setRotation(r)
// io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
break
// case 'on':
// sense.setPixel(Number(x), Number(y), color_blue)