-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Analogue thrust #3237
Analogue thrust #3237
Conversation
Maybe @kuroneko has opinions, feedback, or want to test this before merge? |
Also @kuroneko you might be interested in these if you're still doing controller stuff? |
Ah, good morning @impaktor, I just had exactly the same thought :D |
…nto analogue-thrust
Hi, I tested your branch. For Roll i must:
Roll Left - press to maximum left trigger and click OK
press to maximum left then right trigger, always after starting game and take off: Otherwise I have symptoms like #3147 note: Trigger pressed halfway changing /-/ on /"+"/ |
Yep I can repro that, not sure why it's happening yet. Thanks for testing it though @radius75 :) |
Well that's a bugger, basically the triggers on a pad run from Damn, this will need some more thinking because I can fix it for the specific case of the Xbox360 pad but that won't fix it for other controllers which might behave differently. |
As far as I can tell the problem is that the controller doesn't start sending any values until you've pressed it. Then the value it's sends are different than when it was at rest!!! |
More specifically, that's because the input system assumes all axes are self-centering or have a centre position, and assumes that they start in the centre position. Rather than initialising the axes to 0, it should be polling the axes positions from the API. |
@kuroneko ah ha! yes that'd do it, thanks :) |
Trouble is that when you try and poll it the value it returns really is This might require an actual configuration step so that the min/max can be found. Nasty. ...needs more thought/practice. |
Wrong layer - go back one further - the assumption exists between the main pioneer object and the SDL layer -- SDL joystick positions are provided as 16 bit integers, not as float - there's code in Ps? (I've forgotten it's name right now) which translates that to the -1..1 FP range. |
@kuroneko that's not relevant this time, that value gets blindly converted into a float regardless of what it is so whether I catch it then, which is not practical, or after it's converted to float doesn't matter. The point is that even when it's an |
Although I do see what you mean now, it should be fetching the initial value from the API rather than waiting for the axis event... |
I'm closing this for now, if someone else wants to pick it up then feel free but I'm going to do something else less frustrating for a bit. Might come back to it later. |
Add support for splitting the axes for pitch/yaw/roll (#3147) (@radius75)
Add support for mapping the thrusters to joystick/pad axes (#27)
Also #3236 is a part of this PR so should be merged first.