From 922cf28cb5786baf260008397694bccbe763f8c8 Mon Sep 17 00:00:00 2001 From: Douglas Rocha Ferraz Date: Fri, 10 Feb 2023 21:30:52 -0300 Subject: [PATCH] chg: corrected order of fnc inclusions (#921) --- .../app/zap-templates/templates/app/helper.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src-electron/generator/matter/app/zap-templates/templates/app/helper.js b/src-electron/generator/matter/app/zap-templates/templates/app/helper.js index 2045908c51..c14e336f88 100644 --- a/src-electron/generator/matter/app/zap-templates/templates/app/helper.js +++ b/src-electron/generator/matter/app/zap-templates/templates/app/helper.js @@ -102,6 +102,16 @@ function chip_endpoint_generated_functions() { hasFunctionArray = true; } + if (configData.ClustersWithShutdownFunctions.includes(clusterName)) { + hasFunctionArray = true; + functionList = functionList.concat( + ` (EmberAfGenericClusterFunction) Matter${cHelper.asCamelCased( + clusterName, + false + )}ClusterServerShutdownCallback,\\\n` + ); + } + if (configData.ClustersWithPreAttributeChangeFunctions.includes(clusterName)) { functionList = functionList.concat( ` (EmberAfGenericClusterFunction) Matter${cHelper.asCamelCased( @@ -219,6 +229,11 @@ function chip_endpoint_cluster_list() { hasFunctionArray = true; } + if (configData.ClustersWithShutdownFunctions.includes(clusterName)) { + c.mask.push('SHUTDOWN_FUNCTION'); + hasFunctionArray = true; + } + if (configData.ClustersWithPreAttributeChangeFunctions.includes(clusterName)) { c.mask.push('PRE_ATTRIBUTE_CHANGED_FUNCTION'); hasFunctionArray = true;