0

我的目标是让鼠标(G102 Lightsync)闪烁一种颜色。相反,它在 IRL 和软件预览中都保持黑色,但 G HUB 说它由我的可执行文件控制。我试图设置设备类型

LogitechGSDK.LogiLedSetTargetDevice(LogitechGSDK.LOGI_DEVICETYPE_ALL);

我试图在之后延迟 5 秒LogitechGSDK.LogiLedInit();

我尝试Main在对象中闪烁鼠标时启动 LED in 方法Task。当前代码:

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);
    }
4

0 回答 0