Homebrew Project Testers wanted: BtEmbedded, a new bluetooth stack

  • Thread starter Thread starter mudrik
  • Start date Start date
  • Views Views 4,694
  • Replies Replies 50
  • Likes Likes 17
Before I proceed with the mapping I need to ask this, though: are your sticks drifting? I notice in your logs that their rest position ranges between 0x7b7 and 0x7e0, while I'd expect the neutral value to be 0x7ff or 0x800.
I think it's what I jokingly call the "natural drift". Both work completely perfect, without any drift problem. Not sure how it works, but I tend to assume some software apps are coded so they add a standard deadzone, that sometimes you have the granular control to extend, for fixing controllers that are too worn out. All analog controllers that I have used over the years have this always-slightly-moving analog sticks.
 
I think it's what I jokingly call the "natural drift". Both work completely perfect, without any drift problem. Not sure how it works, but I tend to assume some software apps are coded so they add a standard deadzone, that sometimes you have the granular control to extend, for fixing controllers that are too worn out. All analog controllers that I have used over the years have this always-slightly-moving analog sticks.

Hi! I got a new version for you: https://github.com/embedded-game-controller/egc-sdl-test/releases/tag/0.3-wiiu5

Please test it, and let me know what works and what doesn't; I suspect that the joysticks's Y movement will be inverted, but who knows. Also, this controller should have a button on the sticks themselves (you can press them down), please send me the log when you press them. Oh, and I forgot to add the L3/R3 to the 3D model, so yeah, you won't see them -- I'll fix that in the next version.
 
Also, this controller should have a button on the sticks themselves (you can press them down), please send me the log when you press them
That was already sent on the zip file I attached.

Unless you are talking about this new version?

So, I ran 0.3-wiiu5. When it syncs the WUPC, the virtual controller shows up on screen, but after 2-3 seconds, it exits automatically.
 
Last edited by niuus,
That was already sent on the zip file I attached.

Unless you are talking about this new version?

Silly me, I thought that the L3/R3 were paddles under the controller :-) OK, if they are the stick buttons, then it's easier; I'll fix that.

So, I ran 0.3-wiiu5. When it syncs the WUPC, the virtual controller shows up on screen, but after 2-3 seconds, it exits automatically.

Mmmm... strange. Can you send me the logs? There might be indication of an error there. Also, the application quits when 4 buttons are pressed at the same time -- it may be that I'm not using the right offset for the button data and therefore assume that the buttons are pressed when they aren't.
 
Silly me, I thought that the L3/R3 were paddles under the controller :-) OK, if they are the stick buttons, then it's easier; I'll fix that.



Mmmm... strange. Can you send me the logs? There might be indication of an error there. Also, the application quits when 4 buttons are pressed at the same time -- it may be that I'm not using the right offset for the button data and therefore assume that the buttons are pressed when they aren't.
Quick attach before I go sleep. This is what stays behind after it closes.
 

Attachments

  • Love
  • Like
Reactions: mudrik and impeeza
Thanks a lot! Please try this new version, I think we should be getting closer :-)

https://github.com/embedded-game-controller/egc-sdl-test/releases/tag/0.3-wiiu6
Okey, this time a static, white virtual controller (front) is on-screen already the second it boots. When you try to sync, a green controller appears over and under the white controller, always rotating. You can kind of rotate it in the opposite direction with the d-pad. The 4 LEDs are always blinking in the WUPC.

I can't see the green controller clearly, but the sticks visually appear like they were always pressed downwards-right.

I pressed buttons in this order: L3, -, +, R3, Y, X, B, A, Up, Down, Left, Right, L1, R1, L2, R2, then pressed reset to exit.
 

Attachments

Okey, this time a static, white virtual controller (front) is on-screen already the second it boots. When you try to sync, a green controller appears over and under the white controller, always rotating. You can kind of rotate it in the opposite direction with the d-pad. The 4 LEDs are always blinking in the WUPC.

Did you have a GameCube controller connected, or another USB controller connected too? That's the only way I can explain the presence of the static controller. Could you also affect the rotation with the left stick, or only with the D-pad? It may be that I'm reading the stick data in the wrong way. And the blinking LEDs, is it a regression, or was it like this even in the previous builds?
Post automatically merged:

Here's a new build, the LEDs should now be set, and indeed the stick calibration was compeltely off:
https://github.com/embedded-game-controller/egc-sdl-test/releases/tag/0.3-wiiu7
 
Last edited by mudrik,
Did you have a GameCube controller connected, or another USB controller connected too?
Yep, sorry for that one, as the Wii is tucked away behind the TV and I rarely connect the GC controller, it was there when I checked.

The only difference is that the static controller is no more. The WUPC is still an always fast rotating virtual controller model.

Could you also affect the rotation with the left stick, or only with the D-pad?
D-pad. Remember that the sticks visually appear to be diagonally pressed.

And the blinking LEDs, is it a regression, or was it like this even in the previous builds?
It was like this before.

Here's a new build, the LEDs should now be set, and indeed the stick calibration was compeltely off:
https://github.com/embedded-game-controller/egc-sdl-test/releases/tag/0.3-wiiu7
It seems I popped here at the right time, right before sleeping, as you posted this while I was responding, hehe.

Visual feedback:

The controller is always rotating, but it is now doing it slowly. I'm guessing this is because there is no deadzone yet on the Left Stick, which rotates the virtual controller.

Left Stick and Right Stick have inverted Y axis. X axis is 100% fine.
L button pressing is registered as ZL.
R button pressing is registered as ZR.
ZL button pressing is registered as L.
ZR button pressing is registered as R.

Every other single button gets registered correctly.

LED 1 was correctly lit all the time.

After finishing all the buttons test, I had a funny side effect at exit: the WUPC got desync from the console, I couldn't get it to work when it was back to HBC. To avoid going to System Menu, I tried opening EgcControllerTest again and synced there. No issue, synced and worked again.

I'm attaching the newest log with 0.3-wiiu7.
I pressed buttons in this order: L3, R3, -, +, Y, X, B, A, Up, Down, Left, Right, L1, R1, L2, R2, Home, then pressed reset to exit.
 

Attachments

It seems I popped here at the right time, right before sleeping, as you posted this while I was responding, hehe.

Good morning! (Assuming you'll be reading this in a few hours :-) )

The controller is always rotating, but it is now doing it slowly. I'm guessing this is because there is no deadzone yet on the Left Stick, which rotates the virtual controller.

Yes, that's expected, my left Joy Con also does the same. BTW, if someone knows how to read the calibration data out of a Wii U Pro controller, that would help -- for the time being, I' using static values. The other trick would be using the first received position as the neutral value, assuming that the sticks are not moved while the controller connects (I read that the Wii's games do work in this way).

Left Stick and Right Stick have inverted Y axis. X axis is 100% fine.
L button pressing is registered as ZL.
R button pressing is registered as ZR.
ZL button pressing is registered as L.
ZR button pressing is registered as R.

Oh! Thanks for pointing out the swapped buttons: indeed, I tried my Wii classic controller and noticed that I made the mistake there too. :-) Now it should be fixed, as well as the axes direction.

After finishing all the buttons test, I had a funny side effect at exit: the WUPC got desync from the console, I couldn't get it to work when it was back to HBC. To avoid going to System Menu, I tried opening EgcControllerTest again and synced there. No issue, synced and worked again.

How do you connect the Wii U Pro to EgcSdlTest? It *should* be enough to press any button on it; if you press the sync button then it is added as a guest controller, so it may be that the controller stays in this mode after the application exits. Try connecting without pressing the Sync button (on the controller and on the Wii), I believe this issue should not appear then.

Anyway, the new build: https://github.com/embedded-game-controller/egc-sdl-test/releases/tag/0.3-wiiu8
 

Site & Scene News

Popular threads in this forum