From 7105148609575569caa534e8a2dde543786fdc61 Mon Sep 17 00:00:00 2001 From: Borys Nykytiuk Date: Tue, 17 Sep 2024 17:27:01 +0300 Subject: [PATCH] Override method linkLed inside lighting app --- examples/lighting-app/telink/include/AppTask.h | 1 + examples/lighting-app/telink/src/AppTask.cpp | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/lighting-app/telink/include/AppTask.h b/examples/lighting-app/telink/include/AppTask.h index c835c88e097c11..310453770deb0c 100644 --- a/examples/lighting-app/telink/include/AppTask.h +++ b/examples/lighting-app/telink/include/AppTask.h @@ -48,6 +48,7 @@ class AppTask : public AppTaskCommon friend class AppTaskCommon; CHIP_ERROR Init(void); + void LinkLeds(LedManager & ledManager); static void LightingActionEventHandler(AppEvent * aEvent); #ifdef CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET diff --git a/examples/lighting-app/telink/src/AppTask.cpp b/examples/lighting-app/telink/src/AppTask.cpp index d981e6349a3a37..63a5cb7d910e0c 100644 --- a/examples/lighting-app/telink/src/AppTask.cpp +++ b/examples/lighting-app/telink/src/AppTask.cpp @@ -59,9 +59,7 @@ CHIP_ERROR AppTask::Init(void) { SetExampleButtonCallbacks(LightingActionEventHandler); InitCommonParts(); -#if (!CONFIG_PWM) - LedManager::getInstance().linkLed(LedManager::EAppLed_App0, 1); -#endif + Protocols::InteractionModel::Status status; app::DataModel::Nullable brightness; @@ -251,3 +249,10 @@ void AppTask::PowerOnFactoryResetTimerEvent(struct k_timer * timer) } } #endif /* CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET */ + +void AppTask::LinkLeds(LedManager & ledManager) +{ +#if (!CONFIG_PWM) + ledManager.linkLed(LedManager::EAppLed_App0, 0); +#endif // !CONFIG_PWM +}