Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic: Could we compress all the important data of a Xinput in a integer ? #298

Open
EloiStree opened this issue Nov 24, 2024 · 0 comments

Comments

@EloiStree
Copy link
Owner

The answer is "no".
But kind of yes

// Frist byte is lost as it is the type so you have 24 bits to store it.
 //111 = 7 | -1 -0.8 -0.5 0 0.5 0.8 1  (if store an axis on 111 bits)
 //1111 = 15 |  1/7=0.15 |  -1 -0.85 -0.7 -0.55 -0.4 -0.25 -0.1 0 0.1 0.25 0.4 0.55 0.7 0.85 1
 //1111 11111 11111 11111 11111 11111
 //111111111 1111111111 1111111111 6 axis in 24 bits
 //111 111 111 111 111 111 6 axis in 18 bits
 //111,111,11 1,111,111,1 11,111111 Giving 6 bits as possible buttons
 //I suppose A X B Y SBL SBR

// A nice version if you don't want precision of the joystick
// But it is also required compression and uncompression with bit shit in sender and received
//11 = 3 -1 0 1   111 as arrow pad
//11,11,11,11 11,11|111|1 11111111
//LH LV RH RV JL,JR DPAD, Back A X B Y SBL SBR JBL JBR  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant