logi-fix.js aktualisiert
This commit is contained in:
parent
42376900aa
commit
304f549cd7
14
logi-fix.js
14
logi-fix.js
@ -118,21 +118,25 @@ function sendColors(overrideColor) {
|
|||||||
device.set_endpoint(1, 0x0602, 0xff43);
|
device.set_endpoint(1, 0x0602, 0xff43);
|
||||||
|
|
||||||
// Send extra keys
|
// Send extra keys
|
||||||
|
counter = 0
|
||||||
while(RGBDataExtra.length > 0) {
|
while(RGBDataExtra.length > 0) {
|
||||||
|
counter += 1
|
||||||
const ledsToSend = Math.min(4, RGBDataExtra.length/4);
|
const ledsToSend = Math.min(4, RGBDataExtra.length/4);
|
||||||
|
|
||||||
//packet = [0x11, 0xFF, 0x10, 0x1F].concat(RGBDataExtra.splice(0, ledsToSend*4));
|
packet = [0x11, 0xFF, 0x10, 0x1F].concat(RGBDataExtra.splice(0, ledsToSend*4));
|
||||||
packet = [ 0x11, 0xff, 0x10, 0x1a, 0x04, 0x00, 0xa1, 0xa1, 0x06, 0x00, 0xd6, 0xd6, 0x29, 0x00, 0x75, 0x75, 0x69, 0x00, 0x11, 0x11 ]
|
|
||||||
device.write(packet, 20);
|
device.write(packet, 20);
|
||||||
|
|
||||||
device.pause(1);
|
device.pause(1);
|
||||||
applyExtra();
|
if ( counter == 3 ){
|
||||||
|
applyExtras()
|
||||||
|
counter = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyExtra() {
|
function applyExtra() {
|
||||||
const packet = [0x11, 0xFF, 0x10, 0x7A];
|
//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 ];
|
||||||
device.write(packet, 20);
|
device.write(packet, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user