From 0a21869362308dabe62a40b46be4332db6b40b01 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 9 Aug 2025 15:22:41 +0100 Subject: [PATCH] Remove V1 usermod --- wled00/fcn_declare.h | 5 ----- wled00/usermod.cpp | 29 ----------------------------- wled00/wled.cpp | 3 --- 3 files changed, 37 deletions(-) delete mode 100644 wled00/usermod.cpp diff --git a/wled00/fcn_declare.h b/wled00/fcn_declare.h index d19f89b27d..acd0d17d3c 100644 --- a/wled00/fcn_declare.h +++ b/wled00/fcn_declare.h @@ -481,11 +481,6 @@ namespace UsermodManager { // Register usermods by building a static list via a linker section #define REGISTER_USERMOD(x) Usermod* const um_##x __attribute__((__section__(".dtors.tbl.usermods.1"), used)) = &x -//usermod.cpp -void userSetup(); -void userConnected(); -void userLoop(); - //util.cpp #ifdef ESP8266 #define HW_RND_REGISTER RANDOM_REG32 diff --git a/wled00/usermod.cpp b/wled00/usermod.cpp deleted file mode 100644 index 40fda83b07..0000000000 --- a/wled00/usermod.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "wled.h" -/* - * This v1 usermod file allows you to add own functionality to WLED more easily - * See: https://github.com/wled-dev/WLED/wiki/Add-own-functionality - * EEPROM bytes 2750+ are reserved for your custom use case. (if you extend #define EEPSIZE in const.h) - * If you just need 8 bytes, use 2551-2559 (you do not need to increase EEPSIZE) - * - * Consider the v2 usermod API if you need a more advanced feature set! - */ - -//Use userVar0 and userVar1 (API calls &U0=,&U1=, uint16_t) - -//gets called once at boot. Do all initialization that doesn't depend on network here -void userSetup() -{ - -} - -//gets called every time WiFi is (re-)connected. Initialize own network interfaces here -void userConnected() -{ - -} - -//loop. You can use "if (WLED_CONNECTED)" to check for successful connection -void userLoop() -{ - -} diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 5826b9ac38..322b6a89b6 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -77,7 +77,6 @@ void WLED::loop() #ifdef WLED_DEBUG unsigned long usermodMillis = millis(); #endif - userLoop(); UsermodManager::loop(); #ifdef WLED_DEBUG usermodMillis = millis() - usermodMillis; @@ -442,7 +441,6 @@ void WLED::setup() DEBUG_PRINTF_P(PSTR("heap %u\n"), ESP.getFreeHeap()); DEBUG_PRINTLN(F("Usermods setup")); - userSetup(); UsermodManager::setup(); DEBUG_PRINTF_P(PSTR("heap %u\n"), ESP.getFreeHeap()); @@ -846,7 +844,6 @@ void WLED::handleConnection() if (improvActive > 1) sendImprovIPRPCResult(ImprovRPCType::Command_Wifi); } initInterfaces(); - userConnected(); UsermodManager::connected(); lastMqttReconnectAttempt = 0; // force immediate update