From 47f2313347291a464c2532a067fe439084ff7093 Mon Sep 17 00:00:00 2001 From: Zhao Xin <7176466@qq.com> Date: Mon, 5 Sep 2022 14:23:10 +0800 Subject: [PATCH] update --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index e2202d1..daf7e67 100644 --- a/server.js +++ b/server.js @@ -105,11 +105,11 @@ io.on('connection', (client) => { io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels }) break case 'turnLeft': - sensehat.led.rotation = ((sensehat.led.rotation - 90) + 360) % 360 + sensehat.led.setRotation(((sensehat.led.rotation - 90) + 360) % 360) io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels }) break case 'turnRight': - sensehat.led.rotation = (sensehat.led.rotation + 90) % 360 + sensehat.led.setRotation((sensehat.led.rotation + 90) % 360) io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels }) break // case 'on':