Aura init fix

This commit is contained in:
Serge
2023-11-21 12:43:10 +01:00
parent d9b615ce2d
commit bb796b8818
2 changed files with 10 additions and 12 deletions

View File

@@ -89,20 +89,18 @@ public static class AsusHid
var devices = FindDevices(AURA_ID);
if (devices is null) return;
try
{
foreach (var device in devices)
using (var stream = device.Open())
foreach (var data in dataList)
foreach (var device in devices)
using (var stream = device.Open())
foreach (var data in dataList)
try
{
stream.Write(data);
Logger.WriteLine($"{log} {device.ProductID.ToString("X")}: {BitConverter.ToString(data)}");
}
}
catch (Exception ex)
{
Logger.WriteLine($"Error writing {log}: {ex.Message} ");
}
catch (Exception ex)
{
Logger.WriteLine($"Error writing {log} {device.ProductID.ToString("X")}: {ex.Message} {BitConverter.ToString(data)} ");
}
}

View File

@@ -250,8 +250,8 @@ namespace GHelper.USB
new byte[] { AsusHid.AURA_ID, 0xb9 },
Encoding.ASCII.GetBytes("]ASUS Tech.Inc."),
new byte[] { AsusHid.AURA_ID, 0x05, 0x20, 0x31, 0, 0x1a },
Encoding.ASCII.GetBytes("^ASUS Tech.Inc."),
new byte[] { 0x5e, 0x05, 0x20, 0x31, 0, 0x1a }
//Encoding.ASCII.GetBytes("^ASUS Tech.Inc."),
//new byte[] { 0x5e, 0x05, 0x20, 0x31, 0, 0x1a }
});
});
}