On Tue Aug 26 09:59:11 2025 +0000, Rémi Bernon wrote:
I wonder if this is the same kind of thing as for autocenter, where SDL/evdev simply lack the ability to indicate how many conditions blocks are provided and where explicitly setting them to full force will force device drivers to all operate in the same manner, when they could decide to differ and have device-specific behavior (for instance as on Windows) if they were better informed. Although in this case and unlike autocenter where we have three possibilities (unset/on/off), the current and default is to have all extra conditions implicitly set to 0. So I guess here it's just a decision whether we set it to 0 or full force. CC @TomaszPakula may I ask your opinion here as you seem to be directly involved in kernel-side evdev development?
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?
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.