Skip to content

Commit

Permalink
Override method linkLed inside lighting app
Browse files Browse the repository at this point in the history
  • Loading branch information
BorysNykytiuk committed Sep 17, 2024
1 parent a35ce39 commit 7105148
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/lighting-app/telink/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 8 additions & 3 deletions examples/lighting-app/telink/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint8_t> brightness;
Expand Down Expand Up @@ -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
}

0 comments on commit 7105148

Please sign in to comment.