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

support for extended adjustable dpi #2237

Merged
merged 3 commits into from
Apr 9, 2024
Merged

support for extended adjustable dpi #2237

merged 3 commits into from
Apr 9, 2024

Conversation

pfps
Copy link
Collaborator

@pfps pfps commented Jan 30, 2024

Fixes #2207

@pfps
Copy link
Collaborator Author

pfps commented Feb 25, 2024

Yes indeed.

@pfps
Copy link
Collaborator Author

pfps commented Feb 25, 2024

Yes indeed. Should be fixed now

@pfps pfps force-pushed the dpi branch 3 times, most recently from 40e0b22 to 17fd1f1 Compare March 3, 2024 22:42
@pfps pfps force-pushed the dpi branch 4 times, most recently from f19b891 to 597b905 Compare March 11, 2024 14:22
@CuteSC2
Copy link

CuteSC2 commented Mar 22, 2024

The mouse is not shown at all, something broke :(
Screenshot_20240322_184222
solar4.log

@CuteSC2
Copy link

CuteSC2 commented Mar 22, 2024

grafik
It lives!!

@CuteSC2
Copy link

CuteSC2 commented Mar 22, 2024

solar dpi change.log
welp, but changing the dpi results in an exception

@pfps
Copy link
Collaborator Author

pfps commented Mar 22, 2024

Does your mouse have both X and Y dpi? Solaar only gets and sets the X dpi and I'm not sure what this does for a mouse with both.

The Pro X 2 appears to have lots of possible dpi values. Does this slow Solaar down appreciably?

What happens if you try to change the DPI with an active profile?

@pfps
Copy link
Collaborator Author

pfps commented Mar 22, 2024

What happens with the exception? Solaar should just mark the setting as in an error state and proceed.

What is happening is that for some devices an active onboard profile prevents changes to the DPI. Try turning off onboard profiles and see what happens.

@CuteSC2
Copy link

CuteSC2 commented Mar 22, 2024

now a different error with onboard profiles disabled
solar dpi error.log

@pfps
Copy link
Collaborator Author

pfps commented Mar 22, 2024

My guess is that your mouse supports different resolutions for X and Y directions and that 0 is not allowable for the Y direction.

There are several ways to support this. I'll try the simplest - one that assumes that all valid X resolutions are also valid Y resolutions.

@pfps
Copy link
Collaborator Author

pfps commented Mar 22, 2024

The current version of the PR makes some allowances for y direction DPI but assumes that it can be set the same as the x direction DPI. I had thought that it would be a lot of work to separate them, but it may not be too difficult in the end.

But please try out this version and post the result of solaar -ddd from startup to an attempt to change DPI.

@pfps pfps force-pushed the dpi branch 6 times, most recently from 25b3304 to 8330950 Compare March 27, 2024 14:21
@pfps pfps changed the title device: limited support for extended adjustable dpi support for extended adjustable dpi Mar 27, 2024
@pfps
Copy link
Collaborator Author

pfps commented Mar 27, 2024

@MattHag I removed the pip-installed Solaar on my machine and now I'm experiencing strange effects with pytest.

pytest --cov-report term-missing --cov=lib/logitech_receiver tests/logitech_receiver/test_hidpp20_simple.py 

generates a reasonable coverage report, but

pytest --cov-report term-missing --cov=lib/logitech_receiver tests/logitech_receiver/test_setting_templates.py 

produces the warning /home/pfps/.local/lib/python3.12/site-packages/coverage/control.py:887: CoverageWarning: No data was collected. (no-data-collected) self._warn("No data was collected.", slug="no-data-collected") and the coverage report shows no coverage at all even though a lot of tests were run.

Any ideas on what is going on?

@MattHag
Copy link
Collaborator

MattHag commented Mar 27, 2024

No, I don't know. But the coverage on GitHub is mostly lower than local.

@pfps pfps force-pushed the dpi branch 3 times, most recently from dcfd263 to 4b48bd6 Compare March 28, 2024 11:56
@pfps pfps merged commit b43cdac into pwr-Solaar:master Apr 9, 2024
3 checks passed
@DexterHaxxor
Copy link

Getting the same error as described by CuteSC2 even after these commits

@pfps
Copy link
Collaborator Author

pfps commented Apr 14, 2024

See the bug issue for this change.

@MattHag
Copy link
Collaborator

MattHag commented Apr 14, 2024

Regarding the coverage, that could be caused by a seg fault, which I get at least locally from one test.

@pfps pfps deleted the dpi branch June 3, 2024 12:16
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

Successfully merging this pull request may close these issues.

Logitech G Pro X Superlight 2 support
4 participants