logi-fix.js aktualisiert
This commit is contained in:
parent
4288a0456b
commit
ec8ad6cd1c
26
logi-fix.js
26
logi-fix.js
@ -103,13 +103,25 @@ function sendColors(overrideColor) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
device.set_endpoint(1, 0x0604, 0xff43);
|
||||||
|
|
||||||
|
// Send normal keys
|
||||||
|
while(RGBData.length > 0) {
|
||||||
|
const ledsToSend = Math.min(14, RGBData.length/4);
|
||||||
|
|
||||||
|
packet = [0x12, 0xFF, 0x0C, 0x3E, 0x00, 0x01, 0x00, ledsToSend].concat(RGBData.splice(0, ledsToSend*4));
|
||||||
|
|
||||||
|
device.write(packet, 64);
|
||||||
|
device.pause(1);
|
||||||
|
}
|
||||||
|
|
||||||
device.set_endpoint(1, 0x0602, 0xff43);
|
device.set_endpoint(1, 0x0602, 0xff43);
|
||||||
|
|
||||||
// Send extra keys
|
// Send extra keys
|
||||||
while(RGBDataExtra.length > 0) {
|
while(RGBDataExtra.length > 0) {
|
||||||
const ledsToSend = Math.min(4, RGBDataExtra.length/4);
|
const ledsToSend = Math.min(4, RGBDataExtra.length/4);
|
||||||
|
|
||||||
packet = [0x11, 0xFF, 0x10, 0x1A].concat(RGBDataExtra.splice(0, ledsToSend*4));
|
packet = [0x11, 0xFF, 0x10, 0x1F].concat(RGBDataExtra.splice(0, ledsToSend*4));
|
||||||
device.write(packet, 20);
|
device.write(packet, 20);
|
||||||
device.pause(1);
|
device.pause(1);
|
||||||
console.log(RGBDataExtra);
|
console.log(RGBDataExtra);
|
||||||
@ -123,18 +135,6 @@ function sendColors(overrideColor) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
device.set_endpoint(1, 0x0604, 0xff43);
|
|
||||||
|
|
||||||
// Send normal keys
|
|
||||||
while(RGBData.length > 0) {
|
|
||||||
const ledsToSend = Math.min(14, RGBData.length/4);
|
|
||||||
|
|
||||||
packet = [0x12, 0xFF, 0x0C, 0x3E, 0x00, 0x01, 0x00, ledsToSend].concat(RGBData.splice(0, ledsToSend*4));
|
|
||||||
|
|
||||||
device.write(packet, 64);
|
|
||||||
device.pause(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
applyExtra();
|
applyExtra();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user