-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sidewinder 3-bit data reading is too slow #20
Comments
First mentioned here: |
Thanks, now I understand. Just discovered the serial debug feature:
|
I had to fight this already for the Sidewinder Precision Pro. To be honest, I didn't think, that this will come up again :) The FFB Wheel implementation was contributed by another user. I have no such device at hand, so I couldn't test it myself, but as it was reported as working by multiple users, I assumed, that it's ok. Obviously not quite.... |
Here is my modified readPacket from Sidewinder.h
|
Jup, this fixes it completely! |
Yes, it is the same idea, which I had, since two of the three bits are in the same register, so we actually need to read only twice. But I have to think about how to implement it in a clean way, since this is an absolutely evil hack :) |
Hi guys! The idea to read the registers once and just get the bits out of it is great, but unfortunately that would either mean a messy code, which I prefer to avoid, or a massive rewrite of the registers reading code. I have a clue how to do that, but I'm currently quite short on time. So I decided to try something less complicated and optimized the code which is used to wait for the clock. The optimization is not huge, only couple of ticks, but that is may be enough to get this issue fixed. Would you please try out the code from the pull-request #21 with the wheel and see if it makes some difference? Unfortunately all joysticks which I have at hand work flawlessly, so I can't validate this myself. |
|
Perfect! Thank you for testing. Then the optimization goes into the main branch. |
Some Sidewinder devices report the data in 3-bits per clock. Reading 3 times between the clocks is an extremely time critical task, which seem to fail for some devices. Unfortunately it is not possible to read all pins in one go, since they are all hanging on different MCU ports. That is due to historical reasons, since the adapter was initially designed for the simple analogue joysticks and at that point it was not clear how much more it will have to handle. Probably this issue could be fixed easier by redesign the hardware, but if it is possible to keep up the compatibility, I'd rather try to fix it in software.
The text was updated successfully, but these errors were encountered: