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

Don't switch source when already set #91

Merged
merged 3 commits into from
May 29, 2022
Merged

Don't switch source when already set #91

merged 3 commits into from
May 29, 2022

Conversation

adosikas
Copy link
Contributor

@adosikas adosikas commented Feb 15, 2022

When (re)starting the service, my monitor would flicker off while it re-applied the input.

Since there already was code to get the current source, I decided to add a check to skip setting the source if already set to the desired value.

Not really familiar with rust, so feel free to edit or make your own version.

Also, it might make sense to make this configurable, as mentioned in #30 and xkcd 1172.

@craftyguy
Copy link

I've been testing this (on Alpine Linux) and it seems to be working quite well! I hope it can be reviewed/merged soon 😄

@thirtythreeforty
Copy link
Contributor

I just tested this and it doesn't work for me:

03:11:46 [INFO] Display 'DEL DELL P2719H 4H9RVS2' is currently set to Custom(0xf0f)

This is officially the monitor's fault, I think - 0xf0f is of course not what it was set to. However I don't know if some of these are option bits that need to be masked out (I am not familiar with the DDC commands in question).

@haimgel haimgel self-requested a review May 29, 2022 19:27
Copy link
Owner

@haimgel haimgel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great contribution, thank you @adosikas! Sorry about the delay.

@haimgel haimgel merged commit 804a146 into haimgel:main May 29, 2022
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.

4 participants