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

Wave effect speed controll missing #73

Open
AblakfosoMolyadek opened this issue Jul 19, 2023 · 4 comments
Open

Wave effect speed controll missing #73

AblakfosoMolyadek opened this issue Jul 19, 2023 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@AblakfosoMolyadek
Copy link

I wanted to mess around with the speed of the wave effect. (I wanted to slow it down a bit so it's not that 'flashy'). But it's not an option, as it is on the windows version of synapse.
Then I wanted to edit the files responsible for the effects, but I couldn't find it out how to do it (& where to find it) (it's a skill issue of my side I guess).
Can you add the feature of changing the speed of the wave effect to the app, or give advice how I could do it on my own?

@LoLei LoLei added the help wanted Extra attention is needed label Jul 20, 2023
@sk8ersteve
Copy link
Contributor

sk8ersteve commented Jul 22, 2023

Edit: upon further inspection, there are no specific methods for changing speed in the open-source driver. This might be a driver limitation. Looking into it.

You can start by checking how this project sets other device properties: https://github.com/LoLei/razer-cli/tree/master/razer_cli/razer_cli/setter. I see extensive use of getattr which was confusing for me at first since I don't use Python a lot, but now I see it is just a way to programmatically specify which method you want to call. For some device functions, this isn't necessary but for lighting effects, it is because the open-source driver has different names for different lighting regions per device and for different effects and makes these part of the function names. For example, to change the light effect on my mouse, the methods are set_logo_breath(), set_logo_spectrum(), set_logo_static(), etc.

You can find these method names for your device in the open-source driver here (I'm guessing it's a keyboard so check keyboards.py):
https://github.com/openrazer/openrazer/blob/master/daemon/openrazer_daemon/hardware/

Then you can work your way up from there figuring out how to add a command line arg to razer-cli and appropriately modify the call through up to the appropriate setter class.

@sk8ersteve
Copy link
Contributor

sk8ersteve commented Jul 22, 2023

Looks like it is currently a limitation in the driver:
https://github.com/openrazer/openrazer/blob/master/daemon/openrazer_daemon/dbus_services/dbus_methods/chroma_keyboard.py#L222

Looks like this would be your starting point:
https://github.com/openrazer/openrazer/blob/29bbf766df429ca104a9919fdbd8bdccc1e4424d/driver/razerkbd_driver.c#L1547

https://github.com/openrazer/openrazer/blob/29bbf766df429ca104a9919fdbd8bdccc1e4424d/driver/razerchromacommon.c#L532

You'd want to modify the function definition in razerchromacommon.c/h to include a speed parameter and then modify razerkbd_driver.c/h to call it with a user specified value for only your keyboard, if you want to potentially upstream the fix. I can help you install the driver on Arch Linux. For that, this page is helpful: https://github.com/openrazer/openrazer/wiki/Building-a-package#build-packages-from-a-different-github-repository.

@LoLei
Copy link
Owner

LoLei commented Jul 25, 2023

Thanks for the help @sk8ersteve 🙏🏻

@AblakfosoMolyadek
Copy link
Author

Thanks @sk8ersteve, your help is really appreciated!
I'm an absolute noob for coding (I just started learning it), so it's a bit too advanced for me at the moment. But I'll come back to it in a few weeks or (months), to see if I can solve it myself. (Will be a good exercise for me)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants