add test
This commit is contained in:
parent
f8de4e500c
commit
cfe1de55ae
1 changed files with 4 additions and 2 deletions
6
test.py
6
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()
|
||||
|
|
Loading…
Reference in a new issue