Code Monkey home page Code Monkey logo

Comments (5)

dantob avatar dantob commented on June 8, 2024

Probably less important, but (0)03 heartbeat packets also send axes data. But there appears to be a bug with LT (bytes 6-7) are reset to 00. RT & sticks are sent same as above. I'll update the first post

from xpad.

paroj avatar paroj commented on June 8, 2024

is the 07 packet sent on any button press or only on home button press?

from xpad.

dantob avatar dantob commented on June 8, 2024

07 appears to be once for press and once for release of home button. Possibly Windows asks for it more often, only logging on Linux.
03 appears to be every 20 seconds

I used this in xpadone_process_packet to print packets & dmesg --follow

/* print recieved packet to kernel log */
u8 i;
for (i = 0; i < XPAD_PKT_LEN; i++) {
        printk("(%i)%02x ", i, data[i]);
} printk("\n");

from xpad.

paroj avatar paroj commented on June 8, 2024

Missing these packets could cause input lag / delays.

this is rather theoretical then..

from xpad.

dantob avatar dantob commented on June 8, 2024

Yeah, (0)20 packets appear to be sent about every 8 milliseconds minimum. When a (0)03 packet is sent it doesn't appear to increase that.

Wall time      Packet     Diff
---------------------------------------
[52606.292251] (0)20 ...
[52606.300249] (0)20 ... 7998μs
[52606.308242] (0)20 ... 7993μs
[52606.316247] (0)20 ... 8005μs
[52606.324247] (0)20 ... 8000μs
[52606.332216] (0)20 ... 7969μs
[52606.340248] (0)20 ... 8032μs
[52606.344239] (0)03 ...           3991μs  appears to just slot itself between the 8ms button packets
[52606.348246] (0)20 ... 7998μs    4007μs
[52606.356245] (0)20 ... 7999μs
[52606.364212] (0)20 ... 7967μs
[52606.372236] (0)20 ... 8024μs

EDIT: (0)07 appear to cause about 4 milliseconds delay

Wall time      Packet     Diff
---------------------------------------
[54156.366199] (0)20 ... 
[54156.374230] (0)20 ... 8031μs
[54156.382200] (0)20 ... 7970μs
[54156.390228] (0)20 ... 8028μs
[54156.398219] (0)07 ...           7991μs
[54156.402193] (0)20 ... 11965μs   3974μs      12ms between (0)20 packets
[54156.410189] (0)20 ... 7996μs
[54156.418224] (0)20 ... 8035μs
[54156.426216] (0)20 ... 7992μs
...
[54156.490186] (0)20 ... 
[54156.498217] (0)20 ... 8031μs
[54156.506183] (0)20 ... 7966μs
[54156.514172] (0)07 ...           7989μs
[54156.518192] (0)20 ... 12009μs   4020μs    12ms between (0)20 packets
[54156.522214] (0)20 ... 4022μs              This packet is then sent early?
[54156.530214] (0)20 ... 8000μs
[54156.538213] (0)20 ... 7999μs

from xpad.

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.