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

feat(shell): add brightness_value and brightness_mode #115

Merged
merged 10 commits into from
May 13, 2024

Conversation

Xiaojun0822
Copy link
Contributor

1、The current brightness value can be obtained through brightness_value
2、You can use brightness_mode to determine whether the current brightness adjustment is automatic or manual

Copy link

codecov bot commented May 6, 2024

Codecov Report

Attention: Patch coverage is 53.84615% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 30.55%. Comparing base (c8e6235) to head (7a1261c).

Files Patch % Lines
adbutils/shell.py 42.85% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #115      +/-   ##
==========================================
+ Coverage   30.35%   30.55%   +0.20%     
==========================================
  Files          15       15              
  Lines        1980     2003      +23     
  Branches      315      322       +7     
==========================================
+ Hits          601      612      +11     
- Misses       1360     1372      +12     
  Partials       19       19              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codeskyblue
Copy link
Member

I suggest use property to get brightness instead of function. also brightness can also accept set

Example usage

print(d.brightness)
d.brightness = 80
print(d.brightness_mode) # output BrightnessMode.AUTO | BrightnessMode.MANUAL
d.brightness_mode = BrightnessMode.AUTO

here the BrightnessMode parent class is (int, enum.Enum)

@Xiaojun0822
Copy link
Contributor Author

I suggest use property to get brightness instead of function. also brightness can also accept set

Example usage

print(d.brightness)
d.brightness = 80
print(d.brightness_mode) # output BrightnessMode.AUTO | BrightnessMode.MANUAL
d.brightness_mode = BrightnessMode.AUTO

here the BrightnessMode parent class is (int, enum.Enum)

Modified as required

@codeskyblue codeskyblue merged commit 2138c40 into openatx:master May 13, 2024
4 checks passed
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