Skip to content

Commit 870aef5

Browse files
committed
Override method linkLed inside lighting app
1 parent 20a74bf commit 870aef5

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

examples/lighting-app/telink/include/AppTask.h

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class AppTask : public AppTaskCommon
4848
friend class AppTaskCommon;
4949

5050
CHIP_ERROR Init(void);
51+
void LinkLeds(LedManager & ledManager);
5152

5253
static void LightingActionEventHandler(AppEvent * aEvent);
5354
#ifdef CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET

examples/lighting-app/telink/src/AppTask.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ CHIP_ERROR AppTask::Init(void)
5959
{
6060
SetExampleButtonCallbacks(LightingActionEventHandler);
6161
InitCommonParts();
62-
#if (!CONFIG_PWM)
63-
LedManager::getInstance().linkLed(LedManager::EAppLed_App0, 1);
64-
#endif
62+
6563
Protocols::InteractionModel::Status status;
6664

6765
app::DataModel::Nullable<uint8_t> brightness;
@@ -251,3 +249,10 @@ void AppTask::PowerOnFactoryResetTimerEvent(struct k_timer * timer)
251249
}
252250
}
253251
#endif /* CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET */
252+
253+
void AppTask::LinkLeds(LedManager & ledManager)
254+
{
255+
#if (!CONFIG_PWM)
256+
ledManager.linkLed(LedManager::EAppLed_App0, 0);
257+
#endif // !CONFIG_PWM
258+
}

0 commit comments

Comments
 (0)