diff options
author | jakob.stendahl <jakob.stendahl@infomedia.dk> | 2022-12-24 15:10:48 +0100 |
---|---|---|
committer | Jakob Stendahl <jakob.stendahl@outlook.com> | 2022-12-24 15:10:48 +0100 |
commit | 4b2853d0a1c994602c6c62a047acee3c723c4e89 (patch) | |
tree | 15976083433a128a22425e908eff2c553a1fc433 | |
parent | 1457438493604b899e7929c95a3707b71e63f1e2 (diff) | |
download | Luxcena-Neo-4b2853d0a1c994602c6c62a047acee3c723c4e89.tar.gz Luxcena-Neo-4b2853d0a1c994602c6c62a047acee3c723c4e89.zip |
Add debug print, fix limit on brightness
-rw-r--r-- | NeoRuntime/Runtime/luxcena_neo/strip.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/NeoRuntime/Runtime/luxcena_neo/strip.py b/NeoRuntime/Runtime/luxcena_neo/strip.py index 31e541a..4e4a41a 100644 --- a/NeoRuntime/Runtime/luxcena_neo/strip.py +++ b/NeoRuntime/Runtime/luxcena_neo/strip.py @@ -6,6 +6,7 @@ from .power_calc import calcCurrent """ import rpi_ws281x library, or import dummy version. """ try: import rpi_ws281x as ws + print("rpi_ws281x library imported") except ModuleNotFoundError: """ Dummy STRIP used for debugging purposes """ class STRIP: @@ -135,7 +136,7 @@ class Strip: self.__actual_brightness = value # Logarithmic curve, to try to make the brightness controll feel more natural. v = int(10**((value-1)/41.11)) - self.strip.setBrightness(v) + self.strip.setBrightness(min(255, v)) self.show() def show(self): |