Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix identify cluster trigger effect #10958

Merged
merged 4 commits into from Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 37 additions & 21 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@
"source": "client",
"incoming": 1,
"outgoing": 1
},
{
"name": "TriggerEffect",
"code": 64,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": [
Expand Down Expand Up @@ -5698,7 +5706,7 @@
"commands": [],
"attributes": [
{
"name": "measured value",
"name": "MeasuredValue",
"code": 0,
"mfgCode": null,
"side": "server",
Expand All @@ -5713,7 +5721,7 @@
"reportableChange": 0
},
{
"name": "min measured value",
"name": "MinMeasuredValue",
"code": 1,
"mfgCode": null,
"side": "server",
Expand All @@ -5728,7 +5736,7 @@
"reportableChange": 0
},
{
"name": "max measured value",
"name": "MaxMeasuredValue",
"code": 2,
"mfgCode": null,
"side": "server",
Expand All @@ -5743,7 +5751,7 @@
"reportableChange": 0
},
{
"name": "tolerance",
"name": "Tolerance",
"code": 3,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -6689,6 +6697,14 @@
"source": "client",
"incoming": 1,
"outgoing": 1
},
{
"name": "TriggerEffect",
"code": 64,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": [
Expand Down Expand Up @@ -12666,7 +12682,7 @@
"commands": [],
"attributes": [
{
"name": "measured value",
"name": "MeasuredValue",
"code": 0,
"mfgCode": null,
"side": "server",
Expand All @@ -12681,7 +12697,7 @@
"reportableChange": 0
},
{
"name": "min measured value",
"name": "MinMeasuredValue",
"code": 1,
"mfgCode": null,
"side": "server",
Expand All @@ -12696,7 +12712,7 @@
"reportableChange": 0
},
{
"name": "max measured value",
"name": "MaxMeasuredValue",
"code": 2,
"mfgCode": null,
"side": "server",
Expand All @@ -12711,7 +12727,7 @@
"reportableChange": 0
},
{
"name": "tolerance",
"name": "Tolerance",
"code": 3,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -12778,7 +12794,7 @@
"commands": [],
"attributes": [
{
"name": "measured value",
"name": "MeasuredValue",
"code": 0,
"mfgCode": null,
"side": "server",
Expand All @@ -12793,7 +12809,7 @@
"reportableChange": 0
},
{
"name": "min measured value",
"name": "MinMeasuredValue",
"code": 1,
"mfgCode": null,
"side": "server",
Expand All @@ -12808,7 +12824,7 @@
"reportableChange": 0
},
{
"name": "max measured value",
"name": "MaxMeasuredValue",
"code": 2,
"mfgCode": null,
"side": "server",
Expand All @@ -12823,7 +12839,7 @@
"reportableChange": 0
},
{
"name": "tolerance",
"name": "Tolerance",
"code": 3,
"mfgCode": null,
"side": "server",
Expand All @@ -12838,7 +12854,7 @@
"reportableChange": 0
},
{
"name": "scaled value",
"name": "ScaledValue",
"code": 16,
"mfgCode": null,
"side": "server",
Expand All @@ -12853,7 +12869,7 @@
"reportableChange": 0
},
{
"name": "scaled tolerance",
"name": "ScaledTolerance",
"code": 19,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -12920,7 +12936,7 @@
"commands": [],
"attributes": [
{
"name": "measured value",
"name": "MeasuredValue",
"code": 0,
"mfgCode": null,
"side": "server",
Expand All @@ -12935,7 +12951,7 @@
"reportableChange": 0
},
{
"name": "min measured value",
"name": "MinMeasuredValue",
"code": 1,
"mfgCode": null,
"side": "server",
Expand All @@ -12950,7 +12966,7 @@
"reportableChange": 0
},
{
"name": "max measured value",
"name": "MaxMeasuredValue",
"code": 2,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -18618,7 +18634,7 @@
"commands": [],
"attributes": [
{
"name": "measured value",
"name": "MeasuredValue",
"code": 0,
"mfgCode": null,
"side": "server",
Expand All @@ -18633,7 +18649,7 @@
"reportableChange": 0
},
{
"name": "min measured value",
"name": "MinMeasuredValue",
"code": 1,
"mfgCode": null,
"side": "server",
Expand All @@ -18648,7 +18664,7 @@
"reportableChange": 0
},
{
"name": "max measured value",
"name": "MaxMeasuredValue",
"code": 2,
"mfgCode": null,
"side": "server",
Expand All @@ -18663,7 +18679,7 @@
"reportableChange": 0
},
{
"name": "tolerance",
"name": "Tolerance",
"code": 3,
"mfgCode": null,
"side": "server",
Expand Down
46 changes: 36 additions & 10 deletions examples/all-clusters-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,44 @@ bool emberAfBasicClusterMfgSpecificPingCallback(chip::app::Command * commandObj)
return true;
}

Identify gIdentify0 = {
chip::EndpointId{ 0 },
[](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); },
[](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); },
EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED,
void OnIdentifyStart(Identify *)
{
ChipLogProgress(Zcl, "OnIdentifyStart");
}

void OnIdentifyStop(Identify *)
{
ChipLogProgress(Zcl, "OnIdentifyStop");
}

void OnTriggerEffect(Identify * identify)
{
switch (identify->mCurrentEffectIdentifier)
{
case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK:
ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK");
break;
case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE:
ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE");
break;
case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY:
ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY");
break;
case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE:
ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE");
break;
default:
ChipLogProgress(Zcl, "No identifier effect");
return;
}
}

static Identify gIdentify0 = {
chip::EndpointId{ 0 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect,
};

Identify gIdentify1 = {
chip::EndpointId{ 1 },
[](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); },
[](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); },
EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED,
static Identify gIdentify1 = {
chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect,
};

int main(int argc, char * argv[])
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.