XGMobile backlight control

This commit is contained in:
Serge
2023-05-08 19:33:49 +02:00
parent 07020c3561
commit 57c893ef77
3 changed files with 276 additions and 210 deletions

View File

@@ -1,4 +1,5 @@
using HidLibrary;
using OSD;
using System.Diagnostics;
namespace GHelper
@@ -235,6 +236,22 @@ namespace GHelper
}
public static void ApplyXGMLight(bool status)
{
byte value = status? (byte)0x50:(byte)0;
var msg = new byte[] { 0x5e, 0xc5, value };
foreach (HidDevice device in GetHidDevices(new int[] { 0x1970 }))
{
device.OpenDevice();
var message = new byte[300];
Array.Copy(msg, message, msg.Length);
Debug.WriteLine(BitConverter.ToString(message));
device.WriteFeatureData(message);
device.CloseDevice();
}
}
public static void ApplyAura()
{