diff --git a/SoraV2Utils_Service/SoraV2Interface.cs b/SoraV2Utils_Service/SoraV2Interface.cs index ecc60d9..32f5755 100644 --- a/SoraV2Utils_Service/SoraV2Interface.cs +++ b/SoraV2Utils_Service/SoraV2Interface.cs @@ -11,11 +11,13 @@ namespace SoraV2Tools { private const ushort VID = 0x1915; private const ushort PID_WIRELESS = 0xAE1C; - private const ushort PID_WIRED = 0xAE11; + private const ushort PID_WIRED = 0xAE12; public static List GetDevice() { - var devices = HidDevices.Enumerate(VID, PID_WIRELESS).ToList(); + List devices = HidDevices.Enumerate(VID, PID_WIRELESS) + .Concat(HidDevices.Enumerate(VID, PID_WIRED)) + .ToList(); return devices; } @@ -72,7 +74,11 @@ namespace SoraV2Tools byte fullCharge = responseData[11]; byte online = responseData[12]; - return new DeviceStatus(battery, charging, fullCharge, online); + if ((device.Attributes.ProductId == PID_WIRELESS && online == 1) || + (device.Attributes.ProductId == PID_WIRED && charging == 1)) + { + return new DeviceStatus(battery, charging, fullCharge, online); + } } return new DeviceStatus(); }