Controlling LED of a Logitech mouse

318 views Asked by At

My goal is to just make the mouse (G102 Lightsync) flash a color. Instead it just stays black, both IRL and in software preview, but G HUB says that it is being controlled by my executable. I've tried to set the device type

LogitechGSDK.LogiLedSetTargetDevice(LogitechGSDK.LOGI_DEVICETYPE_ALL);

I've tried to put a 5 second delay after LogitechGSDK.LogiLedInit();

I've tried to init the LED in Main method while flashing the mouse in a Task object. Current code:

void StaticDecharge() // ran from Main() to eliminate static modifier
    {
        LogitechGSDK.LogiLedInitWithName("poggers"); // still gets detected as executable name.exe and not by its name in g hub
        LogitechGSDK.LogiLedSetTargetDevice(LogitechGSDK.LOGI_DEVICETYPE_ALL);
        w = Task.Run(Wait);
        w.Wait();
        LogitechGSDK.LogiLedRestoreLighting();
        LogitechGSDK.LogiLedShutdown();
    }
    
    void Wait()
    {
        Thread.Sleep(2000);
        LogitechGSDK.LogiLedSaveCurrentLighting();
        LogitechGSDK.LogiLedSetLightingForTargetZone(DeviceType.Mouse, 1, 100, 50, 50);
        Console.WriteLine("pog"); // for science
        Thread.Sleep(2000);
    }
0

There are 0 answers