NiyaShy / XB1ControllerBatteryIndicator

A tray application that shows a battery indicator for an Xbox-ish controller and gives a notification when the battery level drops to (almost) empty.
GNU General Public License v2.0
715 stars 51 forks source link

Show battery level when connected via usb cable #8

Closed andreasntr closed 5 years ago

andreasntr commented 5 years ago

This feature would be useful for controllers with play&charge rechargable batteries. Indeed, one would know when the battery is fully charged

Hp93 commented 5 years ago

Best regards, Pham Hung.


From: Andrea Santoro notifications@github.com Sent: Monday, October 1, 2018 10:35:33 PM To: NiyaShy/XB1ControllerBatteryIndicator Cc: Subscribed Subject: [NiyaShy/XB1ControllerBatteryIndicator] Add battery level when connected via usb cable (#8)

This feature would be useful for controllers with play&charge rechargable batteries. Indeed, one would know when the battery is fully charged

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNiyaShy%2FXB1ControllerBatteryIndicator%2Fissues%2F8&data=02%7C01%7C%7C77fe71a4dc5749ccfdf908d627b3876d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636740049349853966&sdata=HOH%2BZXJcf9NiqdrladaPv7m2AKHsCnY%2BSPIdyR3ah6c%3D&reserved=0, or mute the threadhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEXVmC8fmlvHT9CAnLxaMvlopF8GmMq8ks5ugjZFgaJpZM4XCVJn&data=02%7C01%7C%7C77fe71a4dc5749ccfdf908d627b3876d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636740049349853966&sdata=FIuRdR1K0pwP54U9Gew9tyycl7Jj14kVs%2B%2FOJvB%2Fdtw%3D&reserved=0.

NiyaShy commented 5 years ago

That's (according to the official XInput documentation) not possible. as you can see here battery level is only reported for "wireless" controllers. I just tried it out by disabling the "wired" state check in the code, and an XBOne controller connected via USB always reported a full battery pack even though I put in one that was reported as medium on another controller.