From 070b08a9e6c7323c37ddcfbb224b531898b864e7 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Fri, 31 Jan 2025 03:54:17 +0000 Subject: [PATCH] Rename usermod EXAMPLE_v2 to EXAMPLE It'd be better to not propagate the 'v2' suffix any further. This is the standard flavor of usermods now. --- usermods/EXAMPLE/library.json | 4 ++++ usermods/{EXAMPLE_v2 => EXAMPLE}/readme.md | 3 +-- .../usermod_v2_example.h => EXAMPLE/usermod_v2_example.cpp} | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 usermods/EXAMPLE/library.json rename usermods/{EXAMPLE_v2 => EXAMPLE}/readme.md (64%) rename usermods/{EXAMPLE_v2/usermod_v2_example.h => EXAMPLE/usermod_v2_example.cpp} (99%) diff --git a/usermods/EXAMPLE/library.json b/usermods/EXAMPLE/library.json new file mode 100644 index 000000000..276aba493 --- /dev/null +++ b/usermods/EXAMPLE/library.json @@ -0,0 +1,4 @@ +{ + "name:": "EXAMPLE", + "dependencies": {} +} diff --git a/usermods/EXAMPLE_v2/readme.md b/usermods/EXAMPLE/readme.md similarity index 64% rename from usermods/EXAMPLE_v2/readme.md rename to usermods/EXAMPLE/readme.md index 8917a1fba..ee8a2282a 100644 --- a/usermods/EXAMPLE_v2/readme.md +++ b/usermods/EXAMPLE/readme.md @@ -4,7 +4,6 @@ In this usermod file you can find the documentation on how to take advantage of ## Installation -Copy `usermod_v2_example.h` to the wled00 directory. -Uncomment the corresponding lines in `usermods_list.cpp` and compile! +Add `EXAMPLE` to `custom_usermods` in your PlatformIO environment and compile! _(You shouldn't need to actually install this, it does nothing useful)_ diff --git a/usermods/EXAMPLE_v2/usermod_v2_example.h b/usermods/EXAMPLE/usermod_v2_example.cpp similarity index 99% rename from usermods/EXAMPLE_v2/usermod_v2_example.h rename to usermods/EXAMPLE/usermod_v2_example.cpp index df05f3e3d..be4528dee 100644 --- a/usermods/EXAMPLE_v2/usermod_v2_example.h +++ b/usermods/EXAMPLE/usermod_v2_example.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" /* @@ -404,3 +402,6 @@ void MyExampleUsermod::publishMqtt(const char* state, bool retain) } #endif } + +static MyExampleUsermod example_usermod; +REGISTER_USERMOD(example_usermod);