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

Volume and brightness control not working #14

Closed
santhoshraghul13 opened this issue May 26, 2022 · 3 comments
Closed

Volume and brightness control not working #14

santhoshraghul13 opened this issue May 26, 2022 · 3 comments

Comments

@santhoshraghul13
Copy link

Describe the bug

After getting thumb and index close to each other, code stops running, could not perform brightness and volume control. Im running this in Python V-3.8.5. I made no changes to the code
To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.
Every other feature works really good, but controlling fails for me.
Screenshots
If applicable, add screenshots to help explain your problem.
Scsht2
Scsht1

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 10
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

ankit-4129 added a commit that referenced this issue May 29, 2022
issue #14 
resolved : TypeError: unsupported operand type(s) for /: 'float' and 'list'

get_brightness() returns a list if multiple displays are detected,
To fix this pass display=0 to get_brightness().
i.e. : sbcontrol.get_brightness(display=0)
@ankit-4129
Copy link
Collaborator

TypeError: unsupported operand type(s) for /: 'float' and 'list'

You are getting this error because get_brightness() returns a list if multiple displays are detected,
To fix this you should pass display=0 to get_brightness() on line

currentBrightnessLv = sbcontrol.get_brightness(display=0)/100.0
and
sbcontrol.fade_brightness(int(100*currentBrightnessLv) , start = sbcontrol.get_brightness(display=0))

I have pushed these changes in commit a275d9d

Please let us know if this resolved your issue.

@PaxGriefs
Copy link

This did not fix it for Me I still have the exact same error

@fathysr
Copy link

fathysr commented Dec 4, 2022

I keep getting the same error

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

No branches or pull requests

5 participants