diff --git a/test.py b/test.py index 4e1467b..95f14da 100644 --- a/test.py +++ b/test.py @@ -1,6 +1,7 @@ import pyiforce as ifr import serial import pyvjoy +import pyvjoy_ffb as ffb PORT = 'COM7' BAUD = 38400 @@ -48,7 +49,8 @@ with serial.Serial(port=PORT, baudrate=BAUD) as port: setup_wheel(port) j = pyvjoy.VJoyDevice(1) - + ffb.add_ffb(j) + # def handle_wheel(w): # j.data.wAxisX = int(0x4000 * (w['axis']['wheel'] + 1)) @@ -70,7 +72,7 @@ with serial.Serial(port=PORT, baudrate=BAUD) as port: # j.update() # ifr.set_handler(ifr.Packet.INPUT_WHEEL, handle_wheel) - ifr.set_handler(ifr.Packet.INPUT_WHEEL, print) + # ifr.set_handler(ifr.Packet.INPUT_WHEEL, print) while True: ifr.rx_pump()