Closed Fredobedo closed 3 years ago
Please, can you provide a simple compilable test that shows the issue?
I've used your test code by filling the gaps and it works correctly?
Thank you to reply so fast! Did you try on a Raspberry, please? Because my code is working correctly on my dev laptop with Ubuntu, the problem occurs only on my PI4.
I will prepare you the code this afternoon Fred
Here is a sample code, I just tested it on my PI and I confirm it's turning to the left. if I set direction to 0, it also turns to left.
I compiled it like this: "gcc testHaptic.c -o testHaptic -lSDL2" testHaptic.c.txt
Thank you Best regards
Did you try on a Raspberry, please?
No. I can't try on RPi.
I can only think of some compilation issue. Is it a 32 or 64 bits system?
Here is a sample code, I just tested it on my PI and I confirm it's turning to the left. if I set direction to 0, it also turns to left.
Setting the direction to 0 shouldn't turn the wheel. It shouldn't do anything.
Does it turn to the right when setting direction to 1?
Dear, I did the test again and confirm that setting direction to 0 and 1, both move the wheel to the left.
Distributor ID : Raspbian Description : Raspbian GNU/Linux 10 (buster) Release : 10 Codename : buster kernel release : 5.10.17-v7l+ Processor : ARMv7 Processor rev 10 (v7l)
I've created a PR that might fix your problem. Can you try it please?
Let's move the conversation there.
Hi Dear, I request you assistance as I think there may be a bug in new-lg4ff. When I install new-lg4ff module driver on my PI4, I remark that it is not possible anymore to execute a constant effect on my Logitech G25, with direction to right (-1); it always react as left. The same code on the same machine with default drivers is working well.
SDL version is 2.0.14 (but I also tested with previous version and had the same problem).
Here is an extract of my test code: << ... void TriggerConstantEffect(int direction, double strength) { printf("TriggerConstantEffect-direction=%d\n", direction);
} ...
Thank you in advance for your support Fred