mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
XGMobile backlight control
This commit is contained in:
17
app/Aura.cs
17
app/Aura.cs
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user