From 7e81e527a796557e591754148047b1e55f580906 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Mon, 29 May 2023 13:16:31 -0400 Subject: [PATCH] remove invalid cast on qpg platform --- examples/lighting-app/qpg/src/AppTask.cpp | 7 +++---- examples/lock-app/qpg/src/AppTask.cpp | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index 93d2ae3d78dcf4..ab504abfb51a52 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -108,11 +108,9 @@ void OnTriggerIdentifyEffect(Identify * identify) { sIdentifyEffect = identify->mCurrentEffectIdentifier; - if (identify->mCurrentEffectIdentifier == Clusters::Identify::EffectIdentifierEnum::kChannelChange) + if (identify->mEffectVariant != Clusters::Identify::EffectVariantEnum::kDefault) { - ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect variant %d", - to_underlying(identify->mEffectVariant)); - sIdentifyEffect = static_cast(identify->mEffectVariant); + ChipLogDetail(AppServer, "Identify Effect Variant unsupported. Using default"); } switch (sIdentifyEffect) @@ -120,6 +118,7 @@ void OnTriggerIdentifyEffect(Identify * identify) case Clusters::Identify::EffectIdentifierEnum::kBlink: case Clusters::Identify::EffectIdentifierEnum::kBreathe: case Clusters::Identify::EffectIdentifierEnum::kOkay: + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: SystemLayer().ScheduleLambda([identify] { (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, identify); diff --git a/examples/lock-app/qpg/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp index 839e3b9aa8b169..616e7d231482f3 100644 --- a/examples/lock-app/qpg/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -105,11 +105,9 @@ void OnTriggerIdentifyEffect(Identify * identify) { sIdentifyEffect = identify->mCurrentEffectIdentifier; - if (identify->mCurrentEffectIdentifier == Clusters::Identify::EffectIdentifierEnum::kChannelChange) + if (identify->mEffectVariant != Clusters::Identify::EffectVariantEnum::kDefault) { - ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect variant %d", - to_underlying(identify->mEffectVariant)); - sIdentifyEffect = static_cast(identify->mEffectVariant); + ChipLogDetail(AppServer, "Identify Effect Variant unsupported. Using default"); } switch (sIdentifyEffect) @@ -117,6 +115,7 @@ void OnTriggerIdentifyEffect(Identify * identify) case Clusters::Identify::EffectIdentifierEnum::kBlink: case Clusters::Identify::EffectIdentifierEnum::kBreathe: case Clusters::Identify::EffectIdentifierEnum::kOkay: + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: SystemLayer().ScheduleLambda([identify] { (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, identify);