adafruit / Adafruit_CircuitPython_HT16K33

Adafruit CircuitPython driver for the HT16K33, a LED matrix driver IC.
MIT License
41 stars 29 forks source link

Constructor brightness parameter #70

Closed geekguy-wy closed 4 years ago

geekguy-wy commented 4 years ago

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 commented 4 years ago

Addresses issue #70

geekguy-wy commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Yes, that's what I was referring to.