Coder Social home page Coder Social logo

Enable battery reports about xpadneo HOT 7 CLOSED

atar-axis avatar atar-axis commented on August 23, 2024 1
Enable battery reports

from xpadneo.

Comments (7)

atar-axis avatar atar-axis commented on August 23, 2024

The battery report is ID 04, which is is only one byte long. The values i saw until now where always around 80-90. I will observe that and make some tests to find out the correct scale, should be easy then to include that.

from xpadneo.

atar-axis avatar atar-axis commented on August 23, 2024

The report descriptor says the (logical) range is between 0 and 255, I cannot confirm that - I think that it already turned off at around 80 once.

Usage Page (Generic Device Controls) 05 06  

Usage (Battery Strength) 09 20  
Logical Minimum (0) 15 00  
Logical Maximum (255) 26 FF 00  
Report Size (8) 75 08  
Report Count (1) 95 01  
Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02  

from xpadneo.

atar-axis avatar atar-axis commented on August 23, 2024

At least in Linux it behaves like the following:
Relatively full batteries are at 0x86, it stops all rumbling effects at 0x84, it shuts down before reaching 0x83 (for just a moment it becomes 0x04 - sometimes 0x06).

I will have to:

  1. Check if the behaviour is the same for windows
  2. Check how the value is with new, full, quality batteries

Update 1:

  • 0x84 ~ 00-25% (Rumble deactivated)
  • 0x85 ~ 25-50%
  • 0x86 ~ 50-75%
  • 0x87 ~75-100%

Or maybe it is 0-10%, 10-50%, 50-90%, 90-100%?

Update 2:

It's the same behaviour in Windows

Update 3:

  • 0x80 ~Power Cord attached

from xpadneo.

atar-axis avatar atar-axis commented on August 23, 2024

All Information above is only true for AA batteries! I will therefore impement this kind first, I think that the "play and charge"-battery differs a bit since it uses different connectors (at least for charging).

74-103-346-07

from xpadneo.

atar-axis avatar atar-axis commented on August 23, 2024

Started development: d8087aa

from xpadneo.

atar-axis avatar atar-axis commented on August 23, 2024

Basic reports are implemented now, for everything else: let's open a new issue.

from xpadneo.

atar-axis avatar atar-axis commented on August 23, 2024

see #22 (comment)

from xpadneo.

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.