per device config#110
Conversation
|
I'm picking this up again after I left it for a while, so I'm kinda rebuilding the context of what I'm working on (basically I forgot what I was doing lol) |
c26c2ff to
dd43f5e
Compare
dd43f5e to
c623eee
Compare
|
config paths now look something like in my case I have tested configuring multiple mice with different configurations and it's working :) |
|
I'm not really familiar with all the acceleration modes, so I'm not sure how to test them, @AndyFilter if you have any suggestion it would be helpful, or maybe some collection of input values to test manually |
Awesome! That's great to hear, the progress is faster than I expected. I'll test the code myself too soon. Quickly looking at the CI that failed - I think it's just an issue with some includes, so once that's fixed you'll be able to build and run the unit tests. But I doubt anything has changed, as you didn't change any acceleration function implementation. I'll take a look at the tests right now, maybe it's an easy fix. (Also, when running the tests, you don't need to copy and files, or use any python scripts anymore, I just forgot to remove that from the instructions.)
I'm not sure what exactly are you asking about, simple unit tests for all the acceleration modes/functions, if so, then the Tests suite is your friend: https://github.com/AndyFilter/YeetMouse/tree/master/tests. If you want to check if a given mode applied on your system ACTUALLY applies the correct acceleration, then you need a bit more sophisticated setup; and a external device that can emulate a mouse. You don't have to test for this, I'll take care of it, in some spare time, as I already have everything set up, just need to plug the microcomputer to my PC. |
AndyFilter
left a comment
There was a problem hiding this comment.
I didn't have time to look through the driver code yet. But I left some general comments. About the headers - I will push the commit fixing this later today or tomorrow, as I had to go and didn't have time to finish it. Also, I moved the ModesConstants struct to accel.h, as it's not really a shared definition, because from what I can see only the driver uses it. This also solved most of the compilation issues for the GUI and the Testing Suite. I already managed to get the GUI to compile and work locally, next I'll try to work on the Testing Suite, but that should be a similar story. About the headers in general, it's a slippery topic, as one compiler will accept one thing while the other will not, but I'd try to stick to what was already in the code, as no one seemed to complain about it for some time - meaning it might be working just fine.
| // Include numeric types | ||
| #include <linux/types.h> | ||
|
|
||
| #include <linux/kernel.h> |
There was a problem hiding this comment.
This header is already included in Fixed64.h, just in the other order. I swapped the order and it seems to work.
Edit: There is quite a bit of comments like these regarding the includes, I have fixed these issues in my local code, so I won't leave comments on the rest.
There was a problem hiding this comment.
it didn't work for me for some reason, I will wait for your fixes to try them out 🫡
PS: might be an LSP thing
| FP_LONG accel_linear(const struct ModesConstants *constants, FP_LONG acceleration, bool use_smoothing, FP_LONG speed); | ||
| FP_LONG accel_power(const struct ModesConstants *constants, FP_LONG midpoint, FP_LONG acceleration, FP_LONG exponent, bool use_smoothing, FP_LONG speed); | ||
| FP_LONG accel_classic(const struct ModesConstants *constants, FP_LONG acceleration, bool use_smoothing, FP_LONG speed); | ||
| FP_LONG accel_motivity(const struct ModesConstants *constants, FP_LONG midpoint, FP_LONG speed); | ||
| FP_LONG accel_synchronous(const struct ModesConstants *constants, FP_LONG acceleration, bool use_smoothing, FP_LONG speed); | ||
| FP_LONG accel_natural(const struct ModesConstants *constants, FP_LONG midpoint, bool use_smoothing, FP_LONG speed); | ||
| FP_LONG accel_jump(const struct ModesConstants *constants, FP_LONG midpoint, bool use_smoothing, FP_LONG speed); | ||
| FP_LONG accel_lut(unsigned long lut_pairs, const FP_LONG lut_data_x[MAX_LUT_ARRAY_SIZE], const FP_LONG lut_data_y[MAX_LUT_ARRAY_SIZE], FP_LONG speed); |
There was a problem hiding this comment.
Could we instead of passing all the parameters that a given function uses pass the struct accel_params *params? This would greatly reduce the API's complexity for the driver as well as the Testing Suite.
There was a problem hiding this comment.
I was thinking that would make it clearer, but I can change it no problem
|
Hey, I pushed the commit I was talking about earlier that fixes the GUI building. But I didn't entirely fix the Test Suite as it would require fixing all the - now changed - acceleration modes functions (like btw. let me know if the driver compiles now, after I removed some includes. I tested it and it did compile and work, but I couldn't find the |
this adds per device config
current status:
it kinda works, but I'm currently trying to make the sysfs config path more user-friendly, but I'm still figuring out how sysfs works
TODOs: