logi-fix.js aktualisiert
This commit is contained in:
parent
0ef991c983
commit
e06fdec2b6
30
logi-fix.js
30
logi-fix.js
@ -58,8 +58,6 @@ export function LedPositions(){
|
||||
}
|
||||
|
||||
export function Initialize(){
|
||||
GKeySetup();
|
||||
MKeySetup();
|
||||
|
||||
}
|
||||
|
||||
@ -69,28 +67,6 @@ export function Render(){
|
||||
//applyExtra();
|
||||
}
|
||||
|
||||
|
||||
function GKeySetup()//Controls software modes for the G and M keys
|
||||
{
|
||||
device.set_endpoint(1, 0x0602, 0xff43); // System IF
|
||||
|
||||
let packet = [0x11, 0xFF, 0x08, 0x00]; //Info
|
||||
device.write(packet, 20);
|
||||
|
||||
packet = [0x11, 0xFF, 0x08, 0x20, 0x01]; //Software Enable Flag for GKeys and Mkeys
|
||||
device.write(packet, 20);
|
||||
}
|
||||
|
||||
function MKeySetup()//LED Control for the Mkey lights
|
||||
{
|
||||
|
||||
let packet = [0x11, 0xFF, 0x09, 0x00]; //Probably Info
|
||||
device.write(packet, 20);
|
||||
|
||||
packet = [0x11, 0xFF, 0x09, 0x10, 0x00]; //Led Number Flag in binary
|
||||
device.write(packet, 20);
|
||||
}
|
||||
|
||||
export function Shutdown(SystemSuspending) {
|
||||
const color = SystemSuspending ? "#000000" : shutdownColor;
|
||||
sendColors(color);
|
||||
@ -150,14 +126,14 @@ function sendColors(overrideColor) {
|
||||
|
||||
|
||||
device.set_endpoint(1, 0x0602, 0xff43); // System IF
|
||||
device.write(packet, 20);
|
||||
device.write(packet, 64);
|
||||
device.pause(1);
|
||||
}
|
||||
}
|
||||
|
||||
function apply() {
|
||||
//const packet = [0x11, 0xFF, 0x0C, 0x5E];
|
||||
const packet = [0x11, 0xFF, 0x10, 0x7E];
|
||||
const packet = [0x11, 0xFF, 0x0C, 0x5E];
|
||||
//const packet = [0x11, 0xFF, 0x10, 0x7E];
|
||||
|
||||
device.set_endpoint(1, 0x0602, 0xff43); // System IF
|
||||
device.write(packet, 20);
|
||||
|
Loading…
Reference in New Issue
Block a user