From f3be2d2debdc82ff24512437198d891c2ee355ea Mon Sep 17 00:00:00 2001 From: s-mendyka Date: Thu, 6 Jun 2024 19:52:51 +0200 Subject: [PATCH] logi-fix.js aktualisiert --- logi-fix.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/logi-fix.js b/logi-fix.js index 47e0e19..83dfbc5 100644 --- a/logi-fix.js +++ b/logi-fix.js @@ -115,12 +115,14 @@ function sendColors(overrideColor) { device.set_endpoint(1, 0x0602, 0xff43); - // // Send extra keys + // Send extra keys while(RGBDataExtra.length > 0) { - //const ledsToSend = Math.min(1, RGBDataExtra.length/RGBDataExtra.length); - const ledsToSend = 1; - packet = [0x11, 0xFF, 0x10, 0x1A].concat(RGBDataExtra.splice(0, ledsToSend*4)); + const ledsToSend = Math.min(4, RGBDataExtra.length/4); + + packet = [0x11, 0xFF, 0x10, 0x1F].concat(RGBDataExtra.splice(0, ledsToSend*4)); + device.write(packet, 20); + device.pause(1); }