From 4b2853d0a1c994602c6c62a047acee3c723c4e89 Mon Sep 17 00:00:00 2001 From: "jakob.stendahl" Date: Sat, 24 Dec 2022 15:10:48 +0100 Subject: Add debug print, fix limit on brightness --- NeoRuntime/Runtime/luxcena_neo/strip.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'NeoRuntime/Runtime/luxcena_neo') 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): -- cgit v1.2.3