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

Use rounding to prevent incorrect backlight percentage calculation #236

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

Mirei124
Copy link
Contributor

Suppose the brightness of screen is 15%, correspondingly the value of /sys/class/backlight/amdgpu_bl0/brightness is 38, and max_brightness is 255, 38/255 = 0.149, but the output of the calc_percent function is 14, causing the screen brightness will be decreased by 1% when open panel every time.

@ErikReider
Copy link
Owner

I'll try to get to this tonight. If not, ping me :)

Copy link
Owner

@ErikReider ErikReider left a comment

Choose a reason for hiding this comment

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

LGTM! Just fix the CI linter errors and I'll merge :)

@ErikReider ErikReider merged commit a2397da into ErikReider:main Mar 30, 2023
@Mirei124 Mirei124 deleted the backlight-percent branch April 3, 2023 04:06
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.

2 participants