On Tue Aug 26 10:11:39 2025 +0000, Tomasz Pakuła wrote:
Linux exclusively uses polar direction and with polar, PID says that effects use n (n is the number of axes) condition blocks to define forces BUT at least two. For now, Linux expects exactly two condition blocks initialised and the API doesn't really specifies how they will be used. It's impossible for now to define more blocks (for example, for a 4-axis effect) as it's even impossisble to define number of axes and the axes themselves. The standard here is a little confusing since at least two blocks are supposed to be sent but
If the number of Condition report blocks is equal to the number of
axes for the effect, then the first report block applies to the first axis, the second applies to the second axis, and so on. For example, a two-axis spring condition with CP Offset set to zero in both Condition report blocks would have the same effect as the joystick self-centering spring. When a condition is defined for each axis in this way, the effect must not be rotated.
If there is a single Condition report block for an effect with more
than one axis, then the direction along which the parameters of the Condition report block are in effect is determined by the direction parameters passed in the Direction field of the Effect report block. For example, a friction condition rotated 45 degrees (in polar coordinates) would resist joystick motion in the northeast-southwest direction but would have no effect on joystick motion in the northwest-southeast direction. With this, the end effect would be determined by the effect direction fields or the number of condition parameters send should dictate of the condition fileds are even considered? At le the least, a on-axis effect should only consider one condition block. I must say, it's a bit unclear and this is where having a device to literally test out how it feels would be best. I think we should rely on @twhitehead testing here. At least for one-axis effects like in racing, this has no effect so either 0 or full is fine. Ideally, we'd want to compare with a different PID enabled joystick but with the current FF api in Linux, it wouldn't even be possible to determine if we could not send the second condition block.
I did dump and decode the HID packets on Windows too when testing this. As with the hidraw backend, Windows just directly passes a single axis condition block along to the device as specified, so it is entirely device dependent.
Wish I had more devices to test things with, but all I have is the MS Sidewinder 2.
I understand the MS sidewinder FF series where the first mass marketed FF sticks, so I guess there is some hope the other vendors followed suite on how thing work on the sidewinders.