This commit is contained in:
Patrick Moessler 2020-10-30 03:39:05 +01:00
parent f8de4e500c
commit cfe1de55ae

View file

@ -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()