It is currently April 19th, 2024, 10:24 pm

New Plugin: XInput

Share and get help with Plugins and Addons
User avatar
VasTex
Posts: 407
Joined: September 20th, 2012, 3:17 pm
Location: USA - Montana

Re: New Plugin: XInput

Post by VasTex »

That's the conclusion I came to, but I found no function matching aTan2 in Rainmeter and was not nearly determined enough to add it in myself. Either way I would appreciate an expanded set of functions as well. Regardless, as always, keep up the good work. I'm looking forward to whatever it is you cook up next.

**Edit**

Nevermind, seems Morley is on the case!
01010100 01100101 01100011 01101000 01101110 01101111 01101100 01101111 01100111 01101001
01100011 01100001 01101100 00100000 01000010 01100001 01100100 01100001 01110011 01110011
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New Plugin: XInput

Post by jsmorley »

dgrace wrote:Nope, atan is almost useless. You want atan2, but for some reason it wasn't included in Rainmeter's math functions until I added it over the weekend. Just need to poke one of the other guys who makes builds to pull the change in. ;)

dave
Your change to add atan2(y,x) has been made dgrace, and will be in the next beta release on Sunday.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureOne]
Measure=Calc
Formula=atan2(10.0, -10.0) * 180 / PI

[MeterOne]
Meter=String
MeasureName=MeasureOne
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=The arc tangent for (x=-10, y=10) is %1 degrees
1.png
You do not have the required permissions to view the files attached to this post.
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: New Plugin: XInput

Post by dgrace »

jsmorley wrote:Your change to add atan2(y,x) has been made dgrace, and will be in the next beta release on Sunday.
Thanks!

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

Re: New Plugin: XInput

Post by dgrace »

Here's my skin file, most of it should work now except the joystick displays, which will work on Sunday.

dave
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New Plugin: XInput

Post by jsmorley »

dgrace wrote:Here's my skin file, most of it should work now except the joystick displays, which will work on Sunday.

dave
If you want to make sure your skin works with it dgrace, you can get the pre-release build r2357 from here.

http://builds.rainmeter.net/
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: New Plugin: XInput

Post by dgrace »

Just a note: I finally got a second controller and can confirm it works with multiple devices. (current limit from the API is 4)

dave
User avatar
Virginityrocks
Posts: 478
Joined: February 26th, 2011, 10:22 pm

Re: New Plugin: XInput

Post by Virginityrocks »

Someone please make a simple multiplayer game for this, like a maze race or something.
Droptop Four
Dropdown menu bar & app launcher for Windows & Rainmeter
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: New Plugin: XInput

Post by StArL0rd84 »

Dgrace could you post an example meter for the battery function of Xinput?
I know whe have discussed this before, but still can't get it to behave. Sry

This is what I tried:

Code: Select all

[measureXInput_Battery]
Measure=Plugin
Plugin=XInput
Channel=Battery_Pad

[meterBattery]
Meter=STRING
MeasureName=measureXInput_Battery
FontSize=30
but it seems Battery_Pad is tied to left stick for some reason.
Value Changes to 0, -1 and 1 depending on what direction the stick is moved.
Maybe the channel name is wrong?

Found Xinput on Github and as you mention there,
battery metering is enabled
.
I remember, a zero needed to be changed to a one and then recompile.
but i fear something else is wrong, since the value changes with the left stick.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: New Plugin: XInput

Post by dgrace »

Not sure - it seems to be working on mine (or at least as much as I can tell, since I have a wired X360 controller, not a wireless one)'

See if you have any better results with this version: (attached)

dave
You do not have the required permissions to view the files attached to this post.
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: New Plugin: XInput

Post by StArL0rd84 »

Looks promising.
now the value stays at 1, and not triggered by the left stick. YAY :D
I forget what 4 values it spits out though, and what they mean. :P
(Does the value of 1 mean the battery is at 25% ?)

25%
50%
75%
100%

BTW, your new example skin and all the new features is freakin' awesome!
Gj
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))