From: Nathan O. <geo...@ho...> - 2010-03-05 02:36:04
|
Not sure if this is an option, but could we make a calibration dialog that let the user move all of the axis as far as they could go in each direction and store the values as the min and max? Just a thought cuz I'm having trouble with one of mine too. I have a slider on one of my gamepads that would cause trouble for some games unless it was in the middle - even though I never used it. - George > Date: Fri, 5 Mar 2010 13:13:15 +1100 > From: jo...@lu... > To: sup...@li... > Subject: Re: [Supertuxkart-devel] My joystick experience > > Hi, > > now I begin to understand (I might have missed a thing or two in your > previous email, sorry). > > The original problem was that input sensing was not working at all. > > > > As I said my third axis always has a value of -32767, so because of it > > right at the beginning of inputSensing, abs(value) > m_max_sensed_input > > blocks the inputs because it registers 32767 as the max all the time, > > so first I needed to block my 'virtual axis': axis_id > 1. > That's probably hard to do in STK :( One option we might consider: use > only analogue sticks that give at least two different values? Would that > work (gee, see below)? > > ... > > - For the axis in digital mode: > > The first input gets registered at m_sensed_input_on_all_axes; > > The second gets blocked at the first abs(value) > m_max_sensed_input; > > Because the second won't ever be bigger than the first, because the > > first was the maximum. > > Note: The directional-pad is also axis here. > Hmm - so my approach above wouldn't work here, right - since those are > still stick axis, not buttons :( I thought that they would give a button > event (which we can handle). > > > > - For the axis in analog mode: > > With the current revision (with the mod up) it works but I have to move > > the stick very slowly, or else I will have to move more than 2 times to > > map the axis, so I just keep moving until it reads. > That is strange, too - you should get at least three or four reading ... > unless something is very slow. > > > Because of this I thought that the '2 tries checking' was not working > > well, and it is hard to debug this since there is a lot of input values > > passing. So I choose a simpler approach that was just registering the > > input when it arrives at the 'maximum threshold'. That 3/4 was just a > > random value, it could be bigger. > Instead of using two values (which I am not sure where it is coming > from), could we go back to the 0.6.2* way of testing for the selected > axis to report 0? Or perhaps close to zero? > > Wouldn't that solve all problems - except the first one of the axis > always reporting 32767? > > What about instead of storing the maximum, we would store the latest > value equal to the maximum? E.g. even if the first event reports the > -32767, we would get the same again for the actual axis and store this > axis. When you then release the stick, it will go back to 0, and selected? > > > > > By the way, my joystick is PS2-like so it has an 'analog mode' button. > > In this controller I get analog and digital values through the same > > axis, so it can't be the cause for strange coding ;). Also, remember > I think that was what I remembered: you get two events for the same > thing. But no idea, I never did much with the input handling. > > > that I won't ever have 32768, only 32767 :) > Understood - 327678 > > > Auria, I notived that there are two MAX_VALUEs: ine in input.hpp, one in > options_screen_input.cpp (which appears not to be used). > > Cheers, > Joerg > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Supertuxkart-devel mailing list > Sup...@li... > https://lists.sourceforge.net/lists/listinfo/supertuxkart-devel _________________________________________________________________ IM on the go with Messenger on your phone http://go.microsoft.com/?linkid=9712960 |