From 6d9c98fee1930e8bfdd5379ea23461c004b58d8a Mon Sep 17 00:00:00 2001 From: fishbone-git <53238640+fishbone-git@users.noreply.github.com> Date: Wed, 10 Jun 2020 19:03:22 +0200 Subject: [PATCH] Updated Add own functionality (markdown) --- Add-own-functionality.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Add-own-functionality.md b/Add-own-functionality.md index 9bbe500..7e2f96a 100644 --- a/Add-own-functionality.md +++ b/Add-own-functionality.md @@ -71,7 +71,20 @@ Here is a step-by-step guide on how to make your effect: 1. Take a look at some of the effects in `FX.cpp` to see how they are implemented! -2. TBD +2. Add your own routine in FX.cpp starting with: `uint16_t WS2812FX::mode_custom` + +3. Add to total number of effects in FX.h line 101: `#define MODE_COUNT` + +4. Add your mode number (ie` #define FX_MODE_CUSTOM 110`) in FX.h around line 200. + +5. Add your mode around line 400 of FX.h, like so: +` _mode[FX_MODE_CUSTOM] = &WS2812FX::mode_custom;` + +6. Add it to the functions in FX.h around line 600:` mode_custom(void),` + +7. Give it a name at the bottom (10 modes per line) in `JSON_mode_names[]`. Wrap your name in quotes just like the others. + +8. Compile, upload and enjoy! Your new effect will automatically be added to the list in the web ui. If you programmed a nice effect you want to share, submit a pull request!