From c4a71afc377d16bfe47da0a6ad83065681aeae32 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Mon, 8 Jan 2024 07:11:23 +0100 Subject: [PATCH] Fix: off() API not working. This fixes #16. --- src/GigaDisplayRGB.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GigaDisplayRGB.h b/src/GigaDisplayRGB.h index 129c47c..c48a4d5 100644 --- a/src/GigaDisplayRGB.h +++ b/src/GigaDisplayRGB.h @@ -28,7 +28,7 @@ class GigaDisplayBacklight { } void cb() { static int counter = 0; - if (counter > intensity) { + if (counter >= intensity) { *pin = 0; } else { *pin = 1; @@ -50,4 +50,4 @@ class GigaDisplayBacklight { int intensity; }; -#endif \ No newline at end of file +#endif