From eaa20ff4bf7c9e297bee2ff794408b2d174a5a1a Mon Sep 17 00:00:00 2001 From: cschwinne Date: Wed, 16 Mar 2022 19:32:11 +0100 Subject: [PATCH] Add handleOverlayDraw() to example v2 usermod --- usermods/EXAMPLE_v2/usermod_v2_example.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/usermods/EXAMPLE_v2/usermod_v2_example.h b/usermods/EXAMPLE_v2/usermod_v2_example.h index 48fb7cd8..a4fe9389 100644 --- a/usermods/EXAMPLE_v2/usermod_v2_example.h +++ b/usermods/EXAMPLE_v2/usermod_v2_example.h @@ -207,6 +207,17 @@ class MyExampleUsermod : public Usermod { return configComplete; } + + /* + * handleOverlayDraw() is called just before every show() (LED strip update frame) after effects have set the colors. + * Use this to blank out some LEDs or set them to a different color regardless of the set effect mode. + * Commonly used for custom clocks (Cronixie, 7 segment) + */ + void handleOverlayDraw() + { + //strip.setPixelColor(0, RGBW32(0,0,0,0)) // set the first pixel to black + } + /* * getId() allows you to optionally give your V2 usermod an unique ID (please define it in const.h!).