Skip to content

Conversation

@DaveLangstaff
Copy link

coerce new_current to between 0 and 127 to avoid wrap-around when led_current=0
avoids the unexpected result of led_current=0 producing maimum brightness

coerce new_current to between 0 and 127 to avoid wrap-around when led_current=0
@ladyada ladyada requested a review from siddacious December 7, 2020 21:37
@siddacious
Copy link
Contributor

@DaveLangstaff Thanks for catching my bug!

The failing check is from the Black formatter; please use Black to format the code and we should be good to merge

This guide has info on using black:
https://learn.adafruit.com/improve-your-code-with-pylint

Copy link
Contributor

@siddacious siddacious left a comment

Choose a reason for hiding this comment

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

(repeated for mandatory change request comment):
Please format with Black

@adeanzan
Copy link

Sorry for asking a possibly unrelated question in this PR, but I found it while trying to figure out how to turn off the LED. Will this change allow turning off the LED?

I've tried this without success:

sensor = AS7341(i2c)

sensor.led = False

@caternuson caternuson mentioned this pull request Jan 22, 2021
@caternuson
Copy link
Contributor

Closing. Fixed with #9.

@caternuson caternuson closed this Jan 24, 2021
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