It is currently April 16th, 2024, 3:08 pm

XBOX ONE Wireless Controller battery percentage

Get help with creating, editing & fixing problems with skins
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

XBOX ONE Wireless Controller battery percentage

Post by StArL0rd84 »

It's finally done.
After a long jurney of frustration and EUREKA moments, I am happy to present:

XONE 2.0 - Battery Level For Wireless Controller
Image

Skins Included:
1. Controller Button Visualizer + Battery.
2. Battery Only.
3. Settings.

Features:
1. Change colors.
2. Voice wanings/alerts.
3. Voice Volume / Speed.
4. Connected / Disconnected alert.
5. Low battery warning.
6. Battery check combo buttons.
7. Calibration.
8. Eight Battery Themes.

Most of these features can be turned off if needed, using the settings skin.

Please ask if you have any questions about my skin.
And suggestions for next update are appreciated.

Please download from my DeviantArt page.
That way i can track downloads.
And you'll get the latest update.
http://starl0rd84.deviantart.com/art/XONE-2-0-Battery-Level-For-Wireless-Controller-625843595

And i must not forget to thank you dgrace, jsmorley & Thurion for the huge help you have been.
Thanks for enabling the battery feature inside the xInput plugin.
You have made a lot of people happy.
Last edited by StArL0rd84 on August 15th, 2016, 8:49 pm, edited 7 times in total.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: XBOX ONE Wireless Controller battery percentage

Post by dgrace »

I wrote a plugin to parse data from XInput a while back, so you can get the joystick and button states, but the API doesn't return any info about the battery power. Still, you might find it interesting.

https://forum.rainmeter.net/viewtopic.php?f=18&t=20108&hilit=xinput

dave
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: XBOX ONE Wireless Controller battery percentage

Post by dgrace »

Actually just checked, there is a way to get battery info. I'll add it to the plugin.

dave
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: XBOX ONE Wireless Controller battery percentage

Post by dgrace »

Sorry, spoke too soon. It's in a new version of the API that requires Win8+ to build, and I'm not going to upgrade from Win7 for a while yet. But if you're interested in learning how to do it, here's where to start:

https://msdn.microsoft.com/en-us/library/windows/desktop/ee417001%28v=vs.85%29.aspx

dave
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: XBOX ONE Wireless Controller battery percentage

Post by StArL0rd84 »

dgrace wrote:Sorry, spoke too soon. It's in a new version of the API that requires Win8+ to build, and I'm not going to upgrade from Win7 for a while yet. But if you're interested in learning how to do it, here's where to start:

https://msdn.microsoft.com/en-us/library/windows/desktop/ee417001%28v=vs.85%29.aspx

dave

Thanks Dave, i will check it out and repport back :thumbup:
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: XBOX ONE Wireless Controller battery percentage

Post by dgrace »

Actually, here's my code. If you build this under Win8+ and enable DO_BATTERY at the top it should work, hopefully. (I can't compile it on my end with that enabled until I upgrade to Win10, but give it a shot)

https://github.com/dcgrace/XInput

Note the low level API only returns empty/low/med/full, not a full percentage range.

dave
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: XBOX ONE Wireless Controller battery percentage

Post by StArL0rd84 »

Thanks for all your help and sharing your work with me :D
The Rainmeter skin worked perfectly out of the box, and i can see the bars and stuff move when i use the controller.
I changed it a bit and tested the connected feature as well. (It works)
rain.jpg
But i find myself in a bit of a spot again, trying to compile the new dll's incorporating the new battery feature :(
I Downloaded Visual studio 2015 and changed DO_BATTERY to 1 at the top. But i am unsure how to create / compile .dll's.
I tried to click Build > Build solution but got 22 Errors.
I'm a Newbie, i know XD
visu.jpg
Maybe there is a easy fix for me, and you could point me in the right direction, but if not...
If you need Win10 to make the dll's, and don't want to upgrade right away, then maybe you could install it in a virtual box. (The technical preview should be free)
I know this would take some time for you, but i am a bit over my head here, so i would be willing to pay you if you would take the time to do it for me.

Michael
You do not have the required permissions to view the files attached to this post.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: XBOX ONE Wireless Controller battery percentage

Post by dgrace »

Probably easier if you can get jsmorley to grab the code and build it on his end. Should only take a few minutes and then he can post the plugin. Walking someone through "never compiled a line of C" to "functioning Rainmeter plugin" is a bit more than I can commit to.

dave
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: XBOX ONE Wireless Controller battery percentage

Post by StArL0rd84 »

Ok i will try and do that. Tnx again for everything

Michael
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: XBOX ONE Wireless Controller battery percentage

Post by jsmorley »

I have no particular expertise in C++, don't have an XBox, and will not even attempt to debug any problems you might run into, but I certainly can simply create the 32bit and 64bit versions of the plugin using your code and the Rainmeter Plugin SDK:
XInput.zip
This is compiled and linked using VS2013, running under Windows10. I have no possible way to test the plugin, but If you make changes to the code and need me to re-compile it for you, I'm happy to do that.
You do not have the required permissions to view the files attached to this post.