Update python script, nothing special.
This commit is contained in:
parent
3a946cc886
commit
dd9701c3cb
1 changed files with 14 additions and 11 deletions
|
@ -67,20 +67,23 @@ device = {
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
ui = UInput(device, name="3DS", phys="3ds", vendor=0x1, version=0x1, product=0x1)
|
ui = UInput(device, name="3DS", phys="3ds", bustype=0x6)
|
||||||
|
|
||||||
gyroAxis = {
|
gyroAxis = {
|
||||||
e.EV_ABS: [
|
e.EV_ABS: [
|
||||||
e.ABS_X,
|
(e.ABS_X, AbsInfo(0, 0, 0, 2, 0, 2048)),
|
||||||
e.ABS_Y,
|
(e.ABS_Y, AbsInfo(0, 0, 0, 2, 0, 2048)),
|
||||||
e.ABS_Z,
|
(e.ABS_Z, AbsInfo(0, 0, 0, 2, 0, 2048)),
|
||||||
e.ABS_RX,
|
(e.ABS_RX, AbsInfo(0, -1024, 1024, 2, 8, 64)),
|
||||||
e.ABS_RY,
|
(e.ABS_RY, AbsInfo(0, -1024, 1024, 2, 8, 64)),
|
||||||
e.ABS_RZ
|
(e.ABS_RZ, AbsInfo(0, -1024, 1024, 2, 8, 64))
|
||||||
|
],
|
||||||
|
e.EV_MSC: [
|
||||||
|
e.MSC_TIMESTAMP
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
uiGyro = UInput(gyroAxis, name="3DS Gyroscope", phys="3ds", vendor=0x1, version=0x1, product=0x2, input_props=[6])
|
uiGyro = UInput(gyroAxis, name="3DS Motion Sensors", phys="3ds", bustype=0x6, input_props=[6])
|
||||||
|
|
||||||
if (debug):
|
if (debug):
|
||||||
print (ui)
|
print (ui)
|
||||||
|
@ -219,12 +222,12 @@ while True:
|
||||||
ui.write(e.EV_ABS, e.ABS_RY, data["cstickY"])
|
ui.write(e.EV_ABS, e.ABS_RY, data["cstickY"])
|
||||||
ui.write(e.EV_ABS, e.ABS_VOLUME, data["vol"])
|
ui.write(e.EV_ABS, e.ABS_VOLUME, data["vol"])
|
||||||
ui.syn()
|
ui.syn()
|
||||||
uiGyro.write(e.EV_ABS, e.ABS_RX, data["gyroX"])
|
|
||||||
uiGyro.write(e.EV_ABS, e.ABS_RY, data["gyroY"])
|
|
||||||
uiGyro.write(e.EV_ABS, e.ABS_RZ, data["gyroZ"])
|
|
||||||
uiGyro.write(e.EV_ABS, e.ABS_X, data["accelX"])
|
uiGyro.write(e.EV_ABS, e.ABS_X, data["accelX"])
|
||||||
uiGyro.write(e.EV_ABS, e.ABS_Y, data["accelY"])
|
uiGyro.write(e.EV_ABS, e.ABS_Y, data["accelY"])
|
||||||
uiGyro.write(e.EV_ABS, e.ABS_Z, data["accelZ"])
|
uiGyro.write(e.EV_ABS, e.ABS_Z, data["accelZ"])
|
||||||
|
uiGyro.write(e.EV_ABS, e.ABS_RX, data["gyroX"])
|
||||||
|
uiGyro.write(e.EV_ABS, e.ABS_RY, data["gyroY"])
|
||||||
|
uiGyro.write(e.EV_ABS, e.ABS_RZ, data["gyroZ"])
|
||||||
uiGyro.syn()
|
uiGyro.syn()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue