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

Constructor brightness parameter #70

Merged
merged 4 commits into from
Mar 10, 2020
Merged

Constructor brightness parameter #70

merged 4 commits into from
Mar 10, 2020

Conversation

geekguy-wy
Copy link

@geekguy-wy geekguy-wy commented Mar 8, 2020

I added a new brightness=1.0 parameter to the HT16K33 constructor to allow brightness to be set on instantiation. The default is the same as it was before this change to stay consistent and not offer any surprises.

@geekguy-wy
Copy link
Author

Addresses issue #70

@geekguy-wy geekguy-wy changed the title Constructor brighness parameter Constructor brightness parameter Mar 8, 2020
Copy link
Contributor

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

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

This looks great! Thank you. Since this will break code, I want to wait on merging until I update at least one library that I know will break from this change.

@geekguy-wy
Copy link
Author

The default for the new brightness parameter is the same as it was before this change. There should not be any breakage of code. All current calls will remain the same because the brightness parameter is not required.

@makermelissa
Copy link
Contributor

Code such as https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/BLE_Heart_Rate_Trainer/ble_heart_rate_trainer.py will need to be updated as it would error after this change.

@geekguy-wy
Copy link
Author

You can still create an instance with the existing parameters. You do not have to add the brightness parameter - the default is the same as before I made this change.

If you are talking about the change to using a float instead of an int for the brightness value, then that would break code.

@makermelissa
Copy link
Contributor

Yes, that's what I was referring to.

@makermelissa makermelissa merged commit f38cd30 into adafruit:master Mar 10, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Mar 11, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_APDS9960 to 2.0.0 from 1.2.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_APDS9960#19 from caternuson/iss18

Updating https://github.com/adafruit/Adafruit_CircuitPython_CLUE to 2.1.1 from 2.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_CLUE#23 from caternuson/prox_update
  > update pylintrc for black
  > build.yml: move pylint, black, and Sphinx installs to each repo; add description to 'actions-ci/install.sh'

Updating https://github.com/adafruit/Adafruit_CircuitPython_HT16K33 to 4.0.0 from 3.2.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#70 from geekguy-wy/constructor_brighness_parameter
  > Manual merge of adafruit/Adafruit_CircuitPython_HT16K33#63
  > update pylintrc for black
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#69 from makermelissa/set_digit_raw
  > build.yml: move pylint, black, and Sphinx installs to each repo; add description to 'actions-ci/install.sh'
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