logi-fix.js aktualisiert
This commit is contained in:
parent
261a46af5a
commit
fa3f564505
33
logi-fix.js
33
logi-fix.js
@ -100,6 +100,9 @@ function sendColors(overrideColor) {
|
||||
RGBData[(idx*4)+1] = color[0];
|
||||
RGBData[(idx*4)+2] = color[1];
|
||||
RGBData[(idx*4)+3] = color[2];
|
||||
packet = [0x11, 0xFF, 0x10, 0x1F, vLeds[idx],color[0],color[1],color[2]];
|
||||
device.write(packet, 20);
|
||||
device.pause(1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -117,25 +120,25 @@ function sendColors(overrideColor) {
|
||||
|
||||
device.set_endpoint(1, 0x0602, 0xff43);
|
||||
|
||||
// Send extra keys
|
||||
while(RGBDataExtra.length > 0) {
|
||||
applyExtra();
|
||||
const ledsToSend = Math.min(3, RGBDataExtra.length/6);
|
||||
// // Send extra keys
|
||||
// while(RGBDataExtra.length > 0) {
|
||||
// applyExtra();
|
||||
// const ledsToSend = Math.min(3, RGBDataExtra.length/4);
|
||||
|
||||
packet = [0x11, 0xFF, 0x10, 0x1F, 0xb7].concat(RGBDataExtra.splice(0, ledsToSend*3));
|
||||
//packet = [0x11, 0xFF, 0x10, 0x1A, ledsToSend];
|
||||
device.write(packet, 20);
|
||||
device.pause(5);
|
||||
console.log(RGBDataExtra);
|
||||
// packet = [0x11, 0xFF, 0x10, 0x1F, 0xb7].concat(RGBDataExtra.splice(0, ledsToSend*3));
|
||||
// //packet = [0x11, 0xFF, 0x10, 0x1A, ledsToSend];
|
||||
// device.write(packet, 20);
|
||||
// device.pause(5);
|
||||
// console.log(RGBDataExtra);
|
||||
|
||||
// const RGBDataExtra2 = [0xB7, 0x00, 0xFF, 0x00];
|
||||
// const ledsToSend2 = 1;
|
||||
// const packet2 = [0x11, 0xFF, 0x10, 0x1A].concat(RGBDataExtra2.splice(0, ledsToSend2 * 4));
|
||||
// device.write(packet2, 20);
|
||||
// device.pause(1);
|
||||
// // const RGBDataExtra2 = [0xB7, 0x00, 0xFF, 0x00];
|
||||
// // const ledsToSend2 = 1;
|
||||
// // const packet2 = [0x11, 0xFF, 0x10, 0x1A].concat(RGBDataExtra2.splice(0, ledsToSend2 * 4));
|
||||
// // device.write(packet2, 20);
|
||||
// // device.pause(1);
|
||||
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
applyExtra();
|
||||
|
Loading…
Reference in New Issue
Block a user