Hi,
I made a branch/fork of Dolphin with an Option to invert individual axes on the GC controller when using the Wii U GC adapter. (changes here).
And i need to know what the position of the center of the sticks is.
The X and Y axis of both the Analog Stick and the C Stick have values ranging from 0 to 255 (according to the comments left in GCPadStatus.h).
So I assumed that the center position for both sticks would be (127,127).
Here's the line where the magic happens:
If the boolean "SConfig::GetInstance().invertedY[chan]" is false, the expression is funtionally just "pad.stickY = controller_payload_copy[1 + (9 * chan) + 4]", with controller_payload_copy[1 + (9 * chan) + 4] being the input read from the GC Pad. So it's just the Input.
But if the setting is enabled the expression becomes "pad.stickY = 127 + (127 - controller_payload_copy[1 + (9 * chan) + 4]) "
So it takes the difference between the input and the assumed center value and subtracts it from the assumed center value. So if you input 8 units above the Center you'll end up 8 units below the Center.
But when I compiled and tested it the C-Stick seemed to be Off-Center whenever I had the Option enabled. So Position(127,127) can't be the center of the C-Stick.
Using this homebrew app and TAS input I determined the center of the C-Stick to be Position(120,125) and using those values in my second commit fixed the problems I had while testing the earlier build. But I don't know for certain if those values are actually acurate or just really close.
So does anyone know the center value?
I made a branch/fork of Dolphin with an Option to invert individual axes on the GC controller when using the Wii U GC adapter. (changes here).
And i need to know what the position of the center of the sticks is.
The X and Y axis of both the Analog Stick and the C Stick have values ranging from 0 to 255 (according to the comments left in GCPadStatus.h).
So I assumed that the center position for both sticks would be (127,127).
Here's the line where the magic happens:
Code:
pad.stickY = 127 + ((127 - controller_payload_copy[1 + (9 * chan) + 4]) * (2 * SConfig::GetInstance().invertedY[chan] - 1));
But if the setting is enabled the expression becomes "pad.stickY = 127 + (127 - controller_payload_copy[1 + (9 * chan) + 4]) "
So it takes the difference between the input and the assumed center value and subtracts it from the assumed center value. So if you input 8 units above the Center you'll end up 8 units below the Center.
But when I compiled and tested it the C-Stick seemed to be Off-Center whenever I had the Option enabled. So Position(127,127) can't be the center of the C-Stick.
Using this homebrew app and TAS input I determined the center of the C-Stick to be Position(120,125) and using those values in my second commit fixed the problems I had while testing the earlier build. But I don't know for certain if those values are actually acurate or just really close.
So does anyone know the center value?