rdepena / node-dualshock-controller

Eventing API layer over HID for the Sony DualShock 3 and DualShock 4 controllers
208 stars 46 forks source link

Motion events aren't logging #41

Open Harvey3141 opened 9 years ago

Harvey3141 commented 9 years ago

Hi.

I'm, testing under OSX 10.10.1 using the consolePrintDualShock4.js example.

I've got a DS4 controller connected via bluetooth, All the buttons and analog values are logging however I can't see the gyro values. I've had a look through your code, Is there somewhere I'm required turn on logging for motion events specifically?

rdepena commented 9 years ago

Hey @hmb23, sorry for the late reply but at the moment there is no support for the dualshock 4 gyro.

Harvey3141 commented 9 years ago

Hi,

Not a problem, I had just noticed the gyro module in there. Is it something you have looked into much? Have you been able to access even just the raw gyro data?

rdepena commented 9 years ago

Hey, to tell you the truth I had not played around with it for some time but I just reset my DualShock 4 and will start playing around with it this week to see where I left it off. If I recall correctly the generic driver did not send any gyro data but I need to double check. also that was some time ago and better drivers might be available.

JoakimKjellberg commented 7 years ago

Hi @rdepena Any progress with the gyro? I found this post http://gamedev.stackexchange.com/questions/87106/accessing-dualshock-4-motion-sensor-in-windows-ideally-unity where it seems they have the indices for x,y,z values of the gyro and the accelerometer in the input buffer (EDIT: the bytes are incorrect). I tried myself to add this do the configuration file for the DS4, but got stuck because I didn't know how do modify the code... It would be nice to get an actual value instead of just "moved right", as it seems to be for the DS3. Maybe you would be faster at implementing it than me? :) Thanks!

JoakimKjellberg commented 7 years ago

It seems this page was better for decoding bytes (see table Data Format): http://www.psdevwiki.com/ps4/DS4-USB I have not yet been able to get Gyro Z to work though... It seems to me it is very similar to Gyro Y, which is a bit boring.