linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Greg T <greg.iforce@gmail.com>, linux-kernel@vger.kernel.org
Cc: linux-input@vger.kernel.org, Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: |Question] iforce Boeder Force Feedback Wheel
Date: Sat, 2 Jul 2022 22:11:35 -0700	[thread overview]
Message-ID: <01b66305-4dc2-3825-eb59-c0882b662bab@infradead.org> (raw)
In-Reply-To: <495ce212-addc-8ab1-a851-4fd5f6c5c8d9@gmail.com>

[add INPUT]

On 7/1/22 03:39, Greg T wrote:
> I'm trying to make a Boeder Force Feedback Wheel work using its serial 
> interface (/dev/ttyS0).
> 
> 1. As iforce-main.c identifies it as "Unknown I-Force Device 
> [%04x:%04x]", I think those placeholders should be replaced by vendor 
> and product ids, but aren't.
> 
> 2. Here's a patch to make it recognized:
> 
> --- drivers/input/joystick/iforce/iforce-main.c.orig	2022-06-14 19:21:30.000000000 +0200
> +++ drivers/input/joystick/iforce/iforce-main.c	2022-06-30 18:52:38.022039742 +0200
> @@ -50,6 +50,7 @@
>  	{ 0x046d, 0xc291, "Logitech WingMan Formula Force",		btn_wheel, abs_wheel, ff_iforce },
>  	{ 0x05ef, 0x020a, "AVB Top Shot Pegasus",			btn_joystick_avb, abs_avb_pegasus, ff_iforce },
>  	{ 0x05ef, 0x8884, "AVB Mag Turbo Force",			btn_wheel, abs_wheel, ff_iforce },
> +	{ 0x05ef, 0x8886, "Boeder Force Feedback Wheel",		btn_wheel, abs_wheel, ff_iforce },
>  	{ 0x05ef, 0x8888, "AVB Top Shot Force Feedback Racing Wheel",	btn_wheel, abs_wheel, ff_iforce }, //?
>  	{ 0x061c, 0xc0a4, "ACT LABS Force RS",                          btn_wheel, abs_wheel, ff_iforce }, //?
>  	{ 0x061c, 0xc084, "ACT LABS Force RS",				btn_wheel, abs_wheel, ff_iforce },
> 
> 3. There's a problem that the GAS and BRAKE values (in jstest) start 
> from -32767, not 0, and it causes menus in games like RVGL to 
> malfunction and you have to press the pedal halfway while using a 
> menu with keyboard as a really unpleasant workaround.
> The below patches eliminate that problem, but I'm not sure if it's a 
> kernel or user space problem or just my ignorance. (With its Windows 
> 9x driver, by default, both pedals are on the Y-axis, but move away 
> from 0 in the opposite directions.)
> 
> --- drivers/input/joystick/iforce/iforce-main.c.orig	2022-06-14 19:21:30.000000000 +0200
> +++ drivers/input/joystick/iforce/iforce-main.c	2022-07-01 09:49:58.344970061 +0200
> @@ -350,7 +351,7 @@
>  		case ABS_THROTTLE:
>  		case ABS_GAS:
>  		case ABS_BRAKE:
> -			input_set_abs_params(input_dev, t, 0, 255, 0, 0);
> +			input_set_abs_params(input_dev, t, 0, 511, 0, 0);
>  			break;
>  
>  		case ABS_RUDDER:
> 
> --- drivers/input/joystick/iforce/iforce-packets.c.orig	2022-06-14 19:21:30.000000000 +0200
> +++ drivers/input/joystick/iforce/iforce-packets.c	2022-07-01 09:58:10.061354919 +0200
> @@ -178,8 +178,8 @@
>  	case 0x03:	/* wheel position data */
>  		input_report_abs(dev, ABS_WHEEL,
>  				 (__s16) get_unaligned_le16(data));
> -		input_report_abs(dev, ABS_GAS,   255 - data[2]);
> -		input_report_abs(dev, ABS_BRAKE, 255 - data[3]);
> +		input_report_abs(dev, ABS_GAS,   510 - data[2]);
> +		input_report_abs(dev, ABS_BRAKE, 510 - data[3]);
>  
>  		iforce_report_hats_buttons(iforce, data);
>  
> 4. Force feedback seems to work from fftest (at least some of the 
> functions), but when using ff in RVGL or VDrift, the system freezes 
> and I can't find anything related in journalctl after hard resetting. 
> How should I debug this problem?
> 
> It's on Fedora release 34. Kernel/iforce source is from 
> https://gitlab.com/cki-project/kernel-ark/-/tree/fedora-5.17/drivers/input/joystick/iforce
> and the kernel-devel-5.17.12-100.fc34.x86_64 package.

-- 
~Randy

       reply	other threads:[~2022-07-03  5:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <495ce212-addc-8ab1-a851-4fd5f6c5c8d9@gmail.com>
2022-07-03  5:11 ` Randy Dunlap [this message]
2022-07-04  2:19   ` |Question] iforce Boeder Force Feedback Wheel Greg T
2022-07-04 18:41     ` Greg T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01b66305-4dc2-3825-eb59-c0882b662bab@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=greg.iforce@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).