adafruit / Adafruit_CircuitPython_HT16K33

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

Modified the brightness property to use floats instead of ints, and #65

Closed geekguy-wy closed 4 years ago

geekguy-wy commented 4 years ago
changed the animation demo to use it.
FoamyGuy commented 4 years ago

I do like using the floats to be consistent with RGB LEDs and display brightness. But I worry about any existing code using 0-15 breaking with this change.

Is it worth it to handle both ways? i.e. if user passes a number < 1 it will use it as a float, but if its >1 it will use the old 0-15 way?

Or is it better to just go ahead and "rip the bandaid" all at once with the breaking change?

geekguy-wy commented 4 years ago

I do like using the floats to be consistent with RGB LEDs and display brightness. But I worry about any existing code using 0-15 breaking with this change.

Is it worth it to handle both ways? i.e. if user passes a number < 1 it will use it as a float, but if its >1 it will use the old 0-15 way?

Or is it better to just go ahead and "rip the bandaid" all at once with the breaking change?

I could do this, but I think many users will not change to using floats unless they absolutely have to.

makermelissa commented 4 years ago

Closing this PR since it is a duplicate of #70. In the future, it is recommended to use 2 different branches for different PRs as updating the branch will change code on any existing PRs.