logi-fix.js aktualisiert

This commit is contained in:
s-mendyka 2024-06-05 23:44:26 +02:00
parent 98ae8ca63c
commit d406ba9dab

View File

@ -90,20 +90,20 @@ function sendColors(overrideColor) {
color = device.color(iPxX, iPxY);
}
if ([ 213, 156, 183, 184, 185, 186, 187, 161, 158, 160, 159 ].includes(vLeds[idx])) {
//if ([ 213, 156, 183, 184, 185, 186, 187, 161, 158, 160, 159 ].includes(vLeds[idx])) {
RGBDataExtra.push(vLeds[idx]);
RGBDataExtra.push(color[0]);
RGBDataExtra.push(color[1]);
RGBDataExtra.push(color[2]);
} else {
RGBData[(idx*4)] = vLeds[idx];
RGBData[(idx*4)+1] = color[0];
RGBData[(idx*4)+2] = color[1];
RGBData[(idx*4)+3] = color[2];
}
// } else {
// RGBData[(idx*4)] = vLeds[idx];
// RGBData[(idx*4)+1] = color[0];
// RGBData[(idx*4)+2] = color[1];
// RGBData[(idx*4)+3] = color[2];
// }
}
device.set_endpoint(1, 0x0604, 0xff43);
//device.set_endpoint(1, 0x0604, 0xff43);
// Send normal keys
while(RGBData.length > 0) {
@ -135,8 +135,7 @@ function sendColors(overrideColor) {
}
function applyExtra() {
//const packet = [0x11, 0xFF, 0x10, 0x7A];
const packet = [ 0x11, 0xff, 0x10, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ];
const packet = [0x11, 0xFF, 0x10, 0x7A];
device.write(packet, 20);
}