GithubHelp home page GithubHelp logo

Comments (14)

tomoinn avatar tomoinn commented on August 22, 2024

Hi Alan,

Can you check you're using the latest version of the library? Someone else had a very similar problem with the PS4 controller and it turned out to be because it had a different USB product ID to mine, I added that into the latest release which was pushed to PyPi a couple of days ago.

Other than that, can you run the 'list devices' script and paste the output here, that'll tell me everything I need to know about whether your controller is paired, and what IDs it's using.

from approxeng.input.

tomoinn avatar tomoinn commented on August 22, 2024

(the list devices script is just a single command - https://github.com/ApproxEng/approxeng.input/blob/master/scripts/list_devices.py)

from approxeng.input.

alancairns avatar alancairns commented on August 22, 2024

from approxeng.input.

tomoinn avatar tomoinn commented on August 22, 2024

Okay, this is all rather strange. Those axis codes don't exist in linux/input-event-codes.h, which is where they should be found. They're certainly not the axis codes I'd expect from this controller, and their absence from ecodes is also why you're getting an error from the list_devices script. So basically you've got a controller which is sending events that nothing should expect.

Is it working, in the sense of showing any axis changes when you move the sticks? My first thought was that these were accelerometer axes, which I don't see here, but maybe not.

from approxeng.input.

alancairns avatar alancairns commented on August 22, 2024

from approxeng.input.

tomoinn avatar tomoinn commented on August 22, 2024

This is kernel related. Apparently in some kernels the DS4 reports motion sensor data on ABS axes that are outside the evdev spec (see https://patchwork.kernel.org/patch/9444429/ for discussion). On my controller and the kernels I've tested (4.4 and 4.11) I'm not seeing these, but the 4.11 kernel screws up the other axis mappings so something's changing!

The most sensible fix is to suppress the warning messages, assuming everything else under 4.9 is working as intended. It'd be nice to actually support the motion sensors, but there seems a degree of debate about how they'll surface in different kernels, I guess I'll take a look and see whether there's a sane way to do it for Raspbian Stretch because that's going to be the most common request. I imagine the DS3 might be doing something similar with that kernel series.

from approxeng.input.

tomoinn avatar tomoinn commented on August 22, 2024

On 4.8 on my workstation the axis mappings are correct and I'm not seeing any motion events. I suspect, based on the kernel mailing list thread in the last comment, that these will only appear for your particular revision of the DS4 as they're identifying by USB product ID the same as I do in this library.

from approxeng.input.

alancairns avatar alancairns commented on August 22, 2024

from approxeng.input.

tomoinn avatar tomoinn commented on August 22, 2024

from approxeng.input.

alancairns avatar alancairns commented on August 22, 2024

from approxeng.input.

tomoinn avatar tomoinn commented on August 22, 2024

from approxeng.input.

alancairns avatar alancairns commented on August 22, 2024

from approxeng.input.

tomoinn avatar tomoinn commented on August 22, 2024

That's working as intended - you need to set the logging level, i.e.

approxeng.input.logger.setLevel(logging.ERROR)

from approxeng.input.

alancairns avatar alancairns commented on August 22, 2024

from approxeng.input.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.