diff --git a/examples/lighting-app/bouffalolab/common/AppTask.cpp b/examples/lighting-app/bouffalolab/common/AppTask.cpp index 7709af7b532b9a..71c9643c6ffdf3 100644 --- a/examples/lighting-app/bouffalolab/common/AppTask.cpp +++ b/examples/lighting-app/bouffalolab/common/AppTask.cpp @@ -84,6 +84,7 @@ Identify sIdentify = { AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, Clusters::Identify::IdentifyTypeEnum::kLightOutput, + AppTask::OnIdentifyTriggerEffect, }; } // namespace @@ -429,6 +430,28 @@ void AppTask::IdentifyHandleOp(app_event_t event) } } +void AppTask::OnIdentifyTriggerEffect(Identify * identify) +{ + switch (identify->mCurrentEffectIdentifier) + { + case Clusters::Identify::EffectIdentifierEnum::kBlink: + ChipLogProgress(NotSpecified,"Clusters::Identify::EffectIdentifierEnum::kBlink"); + break; + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(NotSpecified,"Clusters::Identify::EffectIdentifierEnum::kBreathe"); + break; + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(NotSpecified,"Clusters::Identify::EffectIdentifierEnum::kOkay"); + break; + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(NotSpecified,"Clusters::Identify::EffectIdentifierEnum::kChannelChange"); + break; + default: + ChipLogProgress(NotSpecified,"No identifier effect"); + break; + } + return; +} void AppTask::ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction) { GetAppTask().PostEvent(APP_EVENT_FACTORY_RESET); diff --git a/examples/lighting-app/bouffalolab/common/AppTask.h b/examples/lighting-app/bouffalolab/common/AppTask.h index 82e342f062e143..d4a7d79d599bcd 100644 --- a/examples/lighting-app/bouffalolab/common/AppTask.h +++ b/examples/lighting-app/bouffalolab/common/AppTask.h @@ -89,6 +89,7 @@ class AppTask static void IdentifyStartHandler(Identify *); static void IdentifyStopHandler(Identify *); static void IdentifyHandleOp(app_event_t event); + static void OnIdentifyTriggerEffect(Identify * identify); private: friend void StartAppTask(void);