MiisendU-Wii-U icon indicating copy to clipboard operation
MiisendU-Wii-U copied to clipboard

Sticks are not smooth.

Open powerofgreed opened this issue 8 years ago • 15 comments

image image

When im moving a LStick diagonally they are just jumping instantly

powerofgreed avatar Nov 22 '17 11:11 powerofgreed

First of all im tried in wii u games. Its working perfectly. Mby bsc usandmee has his own dead zone?its like when u have 100% up and slowly going to left for diagonally its starting from 50%.

powerofgreed avatar Jan 04 '18 13:01 powerofgreed

I finally know the reason why it's not working properly. The problem can be reproduced by going to this URL with the Wii U: https://www.nintendo.com/wiiu/built-in-software/browser-specs/sample/

Normally, when the left stick is used, button press are emulated. Here for example, Right and Up are set to one (pressed): wiiu_11 For some reason, certain position will not set the value to one. In this case where the position is similar to the first example, the value stays at zero: wiiu_00

Of course, UsendMii is using these values and this is the reason why it's not working.

Finding the problem is the first step toward a solution :)

Crayon2000 avatar Jan 05 '18 10:01 Crayon2000

U are the best <3

powerofgreed avatar Jan 06 '18 06:01 powerofgreed

Hi. Is this problem should be fixed in new version ?

powerofgreed avatar Jan 06 '20 05:01 powerofgreed

@powerofgreed, sorry this is not fixed yet :(

Crayon2000 avatar Jan 06 '20 12:01 Crayon2000

Hmm, are you still working on this/are you trying to fix it? Just asking because this is quite old and I'd understand if you don't :P

Kneemund avatar May 07 '20 14:05 Kneemund

@NiemandTV, I have been trying to fix this issue for a while but I was not satisfied with the result. I'm not giving up, I will try again.

Crayon2000 avatar May 10 '20 07:05 Crayon2000

I was trying to see what is going on by using this code:

float rot_deg, xy_deg, radius;
char cross[512];

// Left Stick
VPADGetCrossStickEmulationParamsL(VPAD_CHAN_0, &rot_deg, &xy_deg, &radius);
snprintf(cross, sizeof(cross),
        "rot_deg: %.2f  xy_deg: %.2f  radius: %.6f", rot_deg, xy_deg, radius);
OSScreenPutFontEx(SCREEN_DRC, 0, 3, cross);

float angleLeft = atan2(vpad_data.leftStick.x, vpad_data.leftStick.y) * (180.0 / M_PI);
snprintf(cross, sizeof(cross),
        "x: %.4f\ty: %.4f\tangle: %.4f", vpad_data.leftStick.x, vpad_data.leftStick.y, angleLeft);
OSScreenPutFontEx(SCREEN_DRC, 0, 4, cross);

strcpy(cross, "Left Stick:");
if (vpad_data.hold & VPAD_STICK_L_EMULATION_LEFT) {
    strcat(cross, " Left");
}
if (vpad_data.hold & VPAD_STICK_L_EMULATION_RIGHT) {
    strcat(cross, " Right");
}
if (vpad_data.hold & VPAD_STICK_L_EMULATION_UP) {
    strcat(cross, " Up");
}
if (vpad_data.hold & VPAD_STICK_L_EMULATION_DOWN) {
    strcat(cross, " Down");
}
OSScreenPutFontEx(SCREEN_DRC, 0, 15, cross);

// Right Stick
VPADGetCrossStickEmulationParamsR(VPAD_CHAN_0, &rot_deg, &xy_deg, &radius);
snprintf(cross, sizeof(cross),
        "rot_deg: %.2f  xy_deg: %.2f  radius: %.6f", rot_deg, xy_deg, radius);
OSScreenPutFontEx(SCREEN_DRC, 0, 6, cross);

float angleRight = atan2(vpad_data.rightStick.x, vpad_data.rightStick.y) * (180.0 / M_PI);
snprintf(cross, sizeof(cross),
        "x: %.4f\ty: %.4f\tangle: %.4f", vpad_data.rightStick.x, vpad_data.rightStick.y, angleRight);
OSScreenPutFontEx(SCREEN_DRC, 0, 7, cross);

strcpy(cross, "Right Stick:");
if (vpad_data.hold & VPAD_STICK_R_EMULATION_LEFT) {
    strcat(cross, " Left");
}
if (vpad_data.hold & VPAD_STICK_R_EMULATION_RIGHT) {
    strcat(cross, " Right");
}
if (vpad_data.hold & VPAD_STICK_R_EMULATION_UP) {
    strcat(cross, " Up");
}
if (vpad_data.hold & VPAD_STICK_R_EMULATION_DOWN) {
    strcat(cross, " Down");
}
OSScreenPutFontEx(SCREEN_DRC, 0, 16, cross);

Default values for Right stick emulation:

  • rot_deg: 1.00
  • xy_deg: 60.00
  • radius: 0.28074

Default values for Left stick emulation:

  • rot_deg: -1.00
  • xy_deg: 60.00
  • radius: 0.28074

image

I tried modifying these values with VPADSetCrossStickEmulationParamsL / VPADSetCrossStickEmulationParamsR but it seems there was always a dead zone for some reason. I found out by luck that calling those functions when the problem was present, fix it 😲

So I guess the solution would be set cross stick emulation parameters in the main loop.

Crayon2000 avatar Mar 04 '21 21:03 Crayon2000

The problem mentioned in https://github.com/Crayon2000/UsendMii-Client/issues/5#issuecomment-355523176 is fixed. This is a problem with dead zones, at specific position the stick will not report emulated buttons.

I think that this will not fix the original issue. To fix this issue, emulated button should not be used when analog stick are simulating a controller / joystick. Even if VPAD_STICK_L_EMULATION_RIGHT is not simulated, vpad_data.rightStick.x might still be > 0.

Crayon2000 avatar Mar 05 '21 05:03 Crayon2000

hey, anything new come up?

WWTB-dotcom avatar Sep 19 '21 10:09 WWTB-dotcom

Hi. Is that bug fixed right now?

The problem mentioned in #5 (comment) is fixed. This is a problem with dead zones, at specific position the stick will not report emulated buttons.

I think that this will not fix the original issue. To fix this issue, emulated button should not be used when analog stick are simulating a controller / joystick. Even if VPAD_STICK_L_EMULATION_RIGHT is not simulated, vpad_data.rightStick.x might still be > 0.

powerofgreed avatar Nov 13 '21 18:11 powerofgreed

Hi. Is that bug fixed right now?

@powerofgreed, not yet. I know it's been a while since the original issue was reported. The next UsendMii release will add new features, but this fix is not part of it. I'm getting closer to a solution. I have coded my own AnalogStickToDPad function, but it will not yet be used in the next release.

Crayon2000 avatar Nov 13 '21 19:11 Crayon2000

Np. I was just wondering if this bug even fixable cos i had thoughts that its not. Cos the way how Wii U tells to UsendMii about buttons is inside alredy programmed debuger inside console, isnt?

powerofgreed avatar Nov 13 '21 19:11 powerofgreed

The problem can be fixed on the PC side. No fix are possible in this homebrew.

Crayon2000 avatar Nov 13 '21 19:11 Crayon2000

How can I fix it on my PC?

ghost avatar Jun 28 '23 16:06 ghost