fix(g29): corriger le verrouillage de plage angulaire et le recentrage FFB

- Suppression de la commande 0x14 (default autocenter) qui écrasait la butée 180°
- Déclaration volatile pour les variables d'état partagées inter-cœurs
- Ajout de find_g29() dynamique dans isolate_led.py et test_matrix.py
- Ajout du script de diagnostic FFB et butée test_spring.py
This commit is contained in:
bleackstorm committed 2026-11-11 22:14:12 +01:00
1 parent c28d89c088
commit 70a03ed3c0
4 files changed
+129 -9

No files matched your search

+15 -1
View File
@@ -6,13 +6,27 @@ Tests both FFB (force/spring) and LEDs to find which channel the G29 responds to
import os
import sys
import glob
import time
import fcntl
HIDIOCSFEATURE = lambda length: 0xC0004806 | (length << 16)
def find_g29():
for h in sorted(glob.glob('/dev/hidraw*')):
uevent = f'/sys/class/hidraw/{os.path.basename(h)}/device/uevent'
if os.path.exists(uevent):
try:
with open(uevent) as f:
c = f.read().upper()
if '046D:0000C260' in c or '046D:0000C24F' in c or 'LOGITECH' in c:
return h
except Exception:
pass
return '/dev/hidraw2'
def main():
dev = '/dev/hidraw2'
dev = find_g29()
print(f"=== TEST DIAGNOSTIC G29 PS4 SUR {dev} ===")
fd = os.open(dev, os.O_RDWR)