mirror of
https://github.com/bleackstorm/SteamFrame-FPV-Control-Center.git
synced 2026-12-03 07:31:57 +01:00
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:
1 parent
c28d89c088
commit
70a03ed3c0
4 files changed
+129
-9
No files matched your search
+15
-1
@@ -5,11 +5,24 @@ Isolate the exact LED command on G29
|
||||
|
||||
import os
|
||||
import sys
|
||||
import glob
|
||||
import time
|
||||
import fcntl
|
||||
|
||||
HIDIOCSFEATURE = lambda length: 0xC0004806 | (length << 16)
|
||||
dev = '/dev/hidraw2'
|
||||
|
||||
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 make_cmd(mask):
|
||||
return bytes([0xF8, 0x12, mask, 0x00, 0x00, 0x00, 0x00])
|
||||
@@ -58,6 +71,7 @@ if __name__ == '__main__':
|
||||
|
||||
name, func = candidates[cid]
|
||||
print(f"Test de {name} -> Action: {action}")
|
||||
dev = find_g29()
|
||||
fd = os.open(dev, os.O_RDWR)
|
||||
|
||||
if action == 'off':
|
||||
|
||||
Reference in new issue
Block a user