From 73aeb9e56aa0e1a06daeda986f76e7e1c2b57597 Mon Sep 17 00:00:00 2001 From: Pierrick C Date: Mon, 19 Nov 2018 11:53:22 +0100 Subject: [PATCH] Remove -1 in sparkles mode causing the last LED to be ignored --- code/light_modes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/light_modes.py b/code/light_modes.py index 8dedc65..5c11a1d 100644 --- a/code/light_modes.py +++ b/code/light_modes.py @@ -57,7 +57,7 @@ def sparkles(np_strp, col): np_strp.fill((0, 0, 0)) for _ in range(int(np_strp.n / 4)): - pix = int(urandom.getrandbits(8) / 256 * (np_strp.n - 1)) + pix = int(urandom.getrandbits(8) / 256 * (np_strp.n)) print(pix) np_strp[pix] = col