控制Logitech鼠标的LED

问题描述

我的目标是使鼠标(G102 Lightsync)闪烁一种颜色。相反,无论是IRL还是软件预览,它都保持黑色,但是G HUB表示它由我的可执行文件控制。我尝试设置设备类型

LogitechGSDK.LogiLedSetTargetDevice(LogitechGSDK.LOGI_DEVICETYPE_ALL);

我尝试在LogitechGSDK.LogiLedInit();之后设置5秒的延迟时间

我尝试用Main方法初始化LED,同时在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);
    }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)