hybridgroup / gobot

Golang framework for robotics, drones, and the Internet of Things (IoT)
https://gobot.io
Other
8.96k stars 1.04k forks source link

DualShock4 mappings aren't correct for my controller #621

Open vaskoz opened 6 years ago

vaskoz commented 6 years ago

DualShock4 controller Model: CUH-ZCT2U

More device information:

Product ID: 0x09cc
Vendor ID:  0x054c  (Sony Corporation)

I will open a PR to fix this for my controller.

deadprogram commented 6 years ago

I suggest that you check your kernel version to make sure is 4.14+ on Linux, and alternatively if on OSX try using the "older" mapping that is in the config/dualshock4.json directory.

vaskoz commented 6 years ago

Thx @deadprogram ! I'm on OSX and the mapping in config/dualshock4.json doesn't appear to be correct for my model either. I used platforms/joystick/bin/scanner.go to get the correct mapping for my DualShock4 model. After the changes in my PR, I can fly my drone as expected using https://github.com/hybridgroup/gophercon-2018/blob/master/drone/tello/step6/main.go In addition to my PR #622 , the only local change needed was https://github.com/hybridgroup/gophercon-2018/blob/master/drone/tello/step6/main.go#L36 to read configLocation = "dualshock4"

vaskoz commented 6 years ago

I only have a single model of the DualShock4 controller, but it appears they have at least 4 different models. 3 listed on this wiki page and the model that I own. If this is a model variation issue then perhaps we could breakout the dualshock4 into different variations like dualshock4-t1u.

trevrosen commented 5 years ago

@vaskoz @deadprogram I think that the correct resolution here is to break out the mappings into separate files. Do we have any idea which model we're supporting in the existing mapping?