Browsing this Thread:
1 Anonymous Users
|
Re: USB joystick and posseidon
|
||||
|---|---|---|---|---|
|
Home away from home
![]() |
I sort of remember it now, but it had totally slipped my mind...
I haven't had too much time on these two past days, nightshift at the monkeygarden... I'm setting up stm32 board as xinput gamepad, but the usb code on it wasn't just a few mouse clicks on stm32cubemx software. I have a hunch on the xinput descriptor, but I will need to check it with that st board.
Posted on: 2018/10/3 16:58
|
|||
|
||||
|
Re: USB joystick and posseidon
|
||||
|---|---|---|---|---|
|
Home away from home
![]() |
Quote:
i second that. :thumbsup: @Dizzy: as a small reminder (just in case it slipped)
Posted on: 2018/10/3 0:55
|
|||
|
||||
|
Re: USB joystick and posseidon
|
||||
|---|---|---|---|---|
|
Home away from home
![]() |
@DizzyOfCRN
Nice progress! Keep up the good work! ![]()
Posted on: 2018/10/2 11:13
|
|||
|
||||
|
Re: USB joystick and posseidon
|
||||
|---|---|---|---|---|
|
Home away from home
![]() |
Had to do a usb trace on windows to make sure that the analog channel doesn't get more bits with some iorequest, but the results are the same as with the arosx.class debug call
Posted on: 2018/10/2 8:27
|
|||
|
Jyrki.J.Koivisto
|
||||
|
||||
|
Re: USB joystick and posseidon
|
||||
|---|---|---|---|---|
|
Home away from home
![]() |
I'm sorry but I could never accept such an offer, thanks for the offer anyway, it is a generous one.
Posted on: 2018/10/2 8:23
|
|||
|
Jyrki.J.Koivisto
|
||||
|
||||
|
Re: USB joystick and posseidon
|
||||
|---|---|---|---|---|
|
Home away from home
![]() |
Dizzy: If you like a wireless XBox controller to test with reciver I get you one for free. pm me your address and I send to you. I don't demand anything but if something good comes out if it is great :)
Posted on: 2018/10/2 8:15
|
|||
|
www.aspireos.com
|
||||
|
||||
|
Re: USB joystick and posseidon
|
||||
|---|---|---|---|---|
|
Home away from home
![]() |
And after doing that we can see that the analog values are the same on both bytes, only 8-bits and most significat bit can change depending on direction.
for the positive direction: EPIn: 01 01 EPIn: 03 03 EPIn: 04 04 EPIn: 06 06 EPIn: 07 07 for the negative direction (only most significant bit set on the other) EPIn: 00 00 EPIn: fc 7c EPIn: fb 7b EPIn: f9 79 EPIn: f7 77 EPIn: f6 76 EDIT: Had to check my code, but it really is so... mybug(1, ("EPIn: %02lx %02lx\n", buf[7], (buf[6]&0x7f)));
Posted on: 2018/10/2 7:56
|
|||
|
||||
|
Re: USB joystick and posseidon
|
||||
|---|---|---|---|---|
|
Home away from home
![]() |
So the analog values are really coarse and nothing even close to being 16-bit values. Would be a nightmare to design mass produced item that has 16-bit ADC, just the signal to noise ratio would make it un-makeble ( did I just invent a word... :) )
Posted on: 2018/10/2 7:38
|
|||
|
||||
|
Re: USB joystick and posseidon
|
||||
|---|---|---|---|---|
|
Home away from home
![]() |
Oookkay...
Going in the negative direction we get this: EPIn: 00 80 -> EPIn: ff 7f The least significant byte never leaves the realms of 7-bits, it's 0x7f to 0x00 for the negative direction. For the positive direction we get this: EPIn: 00 80 -> EPIn: 01 81 It does continue to count to 0xff, but never pass that, so it also stays in the 7-bit world, we can just leave the highest bit of the least significant byte to zero always. Highest bit would then tell if the direction is negative or it is positive.
Posted on: 2018/10/2 7:31
|
|||
|
||||
You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.






