-
Notifications
You must be signed in to change notification settings - Fork 105
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
Pull Request for extending Network API #618
base: master
Are you sure you want to change the base?
Conversation
This failed because a missing change in a file from a submodule. (shared/gimx-network-protocol/protocol.h). I dont know how to make a pull in this case. Should i make pull request for the submodule first? |
The missing changed file: https://github.com/Lucashsmello/gimx-network-protocol/blob/master/protocol.h |
Yes, please make a pull request for gimx-network-protocol first. Thanks. |
As a global remark, why not exposing calibration modes instead of the calibration parameters? |
Sorry, but what do mean with exposing calibration modes? Exposing pointer to current struct I forgot to mention that the value INT16_MAX=32767 is used to signal for no modification. This is because the packet is of fixed size so a value must always be sent. Other solutions for not modifying specific calibration values:
|
I just pushed a new commit. I changed .gitmodules to point at my gimx-network-protocol fork so that build checks may pass. Remember to revert it to your own repository url in the future. |
Regarding my comment on exposing the calibration modes: changing sensitivity is nice for pre-made configs, but changing other settings with no calibration mode is really tedious. You may want to provide network access to the calibration mode, instead of only allowing changing the values. |
Understood. This is a feature that i may include in a far future. This is not in my priority list. |
I changed my mind. Thinking about it, it is not hard to implement. It is just not important for my current application. As a bonus, i will expose "exponent factor", "x/y ratio" and profile. I will implement this next sunday. |
I exposed exponent and xy_ratio. Also i fixed a bug where "--curses" interface was not being updated when using network api (Lucashsmello@3adfcde). I did not expose changing profile because i have noticed that, looking the source code, selecting mouse and changing profile have a relation that i could not understand. I did not even know that a mouse could be selected. For selecting calibration mode te and changing calibration test parameters, i am thinking of creating a single packet, that contains 6 bytes:
The problem with this approach is that it assumes all calibration tests to have exactly 1 parameter. But i believe that in the future, if needed, it can be extended to 2 or more parameters with little effort. A question, does allowing negative values for sensibility makes sense? To invert an axis for example. |
Related to issue #605.
This pull request adds the following network functionalities:
See https://github.com/Lucashsmello/GIMX/wiki/Network-api-extended
Notes:
float_swap
incore/controller.c
that do the job.