Thread (4 messages) 4 messages, 3 authors, 2010-01-06

Re: Question: Formula Force GP (Force) Feedback

From: Jiri Kosina <hidden>
Date: 2010-01-06 10:43:11

[ adding some more CCs ]

I haven't been really succesfull extracting the nature of the problem from 
the mail below. Could you please sum it up for the people who haven't seen 
the thread from the beginning?

Thanks.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

On Tue, 5 Jan 2010, wylda@volny.cz wrote:
Hi Peter,

i'm definitely interested, but i'm not a developer. So i try to resend
this mail to guys who helped last time in hope, they will be interested
again and maybe they can provide you some info. I'm able to give just
feedback based on patches and tests.

Hi Jiri & Christophe,
if you remember 15.6. ~ 23.6.2009 (subject: "Force feedback for Logitech
WingMan Formula Force GP") you help me with force feedback on my logitech
wheel and thus kernel support this wheel. Peter found some anomalies
in behaviour/code and would like to consult that stuff.

Sorry if this mail bothers you and you have other things to do...

Regards,
Pavel V.

PS: I would like to stay in touch, so can you leave me on CC?

----- PŮVODNÍ ZPRÁVA -----
Od: "Peter" [off-list ref]
Komu: wylda@volny.cz
Předmět: Re: Question: Formula Force GP (Force) Feedback
Datum: 5.1.2010 - 17:20:15
quoted
Hi,

you might be interested that im getting closer to finding
the source of
the problem.

from drivers/hid/hid-lgff.c: 
quoted
static int hid_lgff_play(struct input_dev *dev, void
*data, struct ff_effect *effect)
quoted
{
        struct hid_device *hid          = input_get_drvdata(dev);
        > >         >         struct list_head  *report_list  = &hid->report_enum[HID_OUTPUT_REPORT].report_list;
        >         > >         >         struct hid_report *report       = list_entry(report_list->next,
        >         > >         struct hid_report, list);
        >         int x, y;
        unsigned int left, right;

#define CLAMP(x) if (x < 0) x = 0; if (x > 0xff)
x = 0xff
quoted
        switch (effect->type)
        {
                case FF_CONSTANT:
                        x = effect->u.ramp.start_level
                        + 0x7f;  /* 0x7f is center
                        */
                        >                         y = effect->u.ramp.end_level
                        >                         > >                         + 0x7f; /**/
                        
i modified the last two lines and got (after some tests)
an idea how to interpret the 2
values and ho they correspond... funny thing is, that
the wheel
responds to both axes.

255   o   <   << <<< <<<<
191   >   o   <   << <<<
127  >>   >   o   <   <<
63  >>>  >>  >   o   <
0 >>>> >>>  >>  >   o
0   63 127 191 255

The problem (as far as i understand it now) seems to
be, that
effect->u.ramp.start_level should have a value between
-128 and 127,
but only goes from 0 to 127. How and why, i have no
idea so far, since
it doesnt seem to be an overflow, but im not so sure
right now. The
result however depends on the application and goes
from when the wheel
goes over center position, it jumps from soft left
to full left force
or just correct forcestrength, but only into the same
direction on both
sides.

I dont know if youre the right person for this, since
the code in
hid-lgff.c doesnt seem to be written from you and your
commit doesnt
touch it. If you've got no idea, just drop me a note
:)

Bye, Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help