After playing a bit with motionserver, I wondered if it was possible to also support nintendo's joycons.
I was unable to go very far, but, this should start it:
doesn't work at all.
Looking at the code from joycond-cemuhook (which works fine in yuzu), I see that it's a += and not =:
sensors = [
device_state.get('accel_y'),
- device_state.get('accel_z'),
device_state.get('accel_x'),
]
# Gyro rotation in deg/s
if report_motion:
sensors.extend([
- device_state.get('motion_y'),
- device_state.get('motion_z'),
device_state.get('motion_x')
])
if event.code == evdev.ecodes.ABS_RX:
self.motion_x += event.value / axis.resolution
if event.code == evdev.ecodes.ABS_RY:
self.motion_y += event.value / axis.resolution
if event.code == evdev.ecodes.ABS_RZ:
self.motion_z += event.value / axis.resolution
if event.code == evdev.ecodes.ABS_X:
self.accel_x = event.value / axis.resolution
if event.code == evdev.ecodes.ABS_Y:
self.accel_y = event.value / axis.resolution
if event.code == evdev.ecodes.ABS_Z:
self.accel_z = event.value / axis.resolution
I know too little of golang to be able to add this by myself, but maybe someone could be interested. The motivation for this, is to be able to start just motionserver and have motion support for both ds4 and joycons in yuzu.
After playing a bit with motionserver, I wondered if it was possible to also support nintendo's joycons. I was unable to go very far, but, this should start it:
In func openDev
The part I wasn't able to do is that in the poll function:
doesn't work at all. Looking at the code from joycond-cemuhook (which works fine in yuzu), I see that it's a += and not =:
I know too little of golang to be able to add this by myself, but maybe someone could be interested. The motivation for this, is to be able to start just motionserver and have motion support for both ds4 and joycons in yuzu.