2007/6/28, Roy Vegard Ovesen <[EMAIL PROTECTED]>:
> On Wednesday 27 June 2007 23:05, woodyst wrote:
> > My yoke is CH Products Yoke. I think (as I see in the code) than
> > FlightGear tests yoke position every input.cxx pass.
> >
> > If it finds that yoke position is different of the virtual yoke it
> > applies real yoke position. And when the autopilot is changing virtual
> > yoke it is different.
>
> Not quite. It tests if the current joystick position is more than a tolerance
> value from its previous position. If it is then the joystick position is
> applied to the "virtual yoke".

You can see in input.cxx:

if ((fabs(axis_values[j] - a.last_value) > a.tolerance)) {
        (...)
        a.last_value = axis_values[j];
        (...)
}

With my yoke stopped, with js_demo i see a lot of lines as:

| 0000 -0.0 +0.1 +1.0 -1.0 -1.0 +0.0 +0.0   .  |

all of them without changes.

So autopilot may change axis values (because my yoke is not noisy) and
this difference (position 0 of yoke and autopilot setting) may be greater than
a.tolerance, so it vibrates (I think, correct me if it is not correct).

> > No, it is not noisy. I have tested it with utils and found that my yoke
> > is very quiet. I think my previous afirmation may be correct.
>
> Very quiet might not be quiet enough. If the noise is more than the tolerance
> value hardcoded into input.cxx (0.002) then you will see what you are seeing.

When I do not touch my yoke it does not pass any event. So there may be
another problem with it. Please probe it by your own keeping your
joystick stopped
(test it with js_demo or something similar). You will see what is my problem.

>
>
> --
> Roy Vegard Ovesen
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>


-- 
Woodyst.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to