Skip to content

Commit

Permalink
Merge branch 'master' into silabs/add_air_quality_app
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak-Shaha authored Sep 11, 2024
2 parents 8fa8df2 + a62b5db commit 0bdcb6b
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 148 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ directory:**

1. [.github/workflows/tests.yaml](https://github.com/project-chip/connectedhomeip/tree/master/.github/workflows/tests.yaml)
2. [scripts/rules.matterlint](https://github.com/project-chip/connectedhomeip/tree/master/scripts/rules.matterlint)
3. [src/app/zap-templates/zcl/data-model/all.xml](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/data-model/all.xml)
4. [src/app/zap-templates/zcl/zcl-with-test-extensions.json](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/zcl-with-test-extensions.json)
5. [src/app/zap-templates/zcl/zcl.json](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/zcl.json)
6. If it is a derived cluster, add a reference to the base cluster definition.
3. [src/app/zap-templates/zcl/zcl-with-test-extensions.json](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/zcl-with-test-extensions.json)
4. [src/app/zap-templates/zcl/zcl.json](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/zcl.json)
5. If it is a derived cluster, add a reference to the base cluster definition.
(e.g. in mode-base-cluster.xml you may need to add cluster codes - otherwise
you may get strange exceptions which aren't clear when running regen_all.py)

Expand All @@ -31,7 +30,7 @@ directory:**
> </struct>
> ```
7. [src/controller/python/chip/clusters/\_\_init\_\_.py](https://github.com/project-chip/connectedhomeip/tree/master/src/controller/python/chip/clusters/__init__.py)
6. [src/controller/python/chip/clusters/\_\_init\_\_.py](https://github.com/project-chip/connectedhomeip/tree/master/src/controller/python/chip/clusters/__init__.py)

**Enable your new cluster in the Python and Android clients** in
[src/controller/data_model/controller-clusters.zap](https://github.com/project-chip/connectedhomeip/blob/master/src/controller/data_model/controller-clusters.zap)
Expand Down
20 changes: 14 additions & 6 deletions examples/platform/silabs/BaseApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,10 @@ void BaseApplication::ScheduleFactoryReset()
{
Provision::Manager::GetInstance().SetProvisionRequired(true);
}
#if SL_WIFI
// Removing the matter services on factory reset
chip::Dnssd::ServiceAdvertiser::Instance().RemoveServices();
#endif
PlatformMgr().HandleServerShuttingDown(); // HandleServerShuttingDown calls OnShutdown() which is only implemented for the
// basic information cluster it seems. And triggers and Event flush, which is not
// relevant when there are no fabrics left
Expand Down Expand Up @@ -851,19 +855,23 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
case DeviceEventType::kThreadConnectivityChange:
case DeviceEventType::kInternetConnectivityChange: {
#ifdef DIC_ENABLE
VerifyOrReturn(event->InternetConnectivityChange.IPv4 == kConnectivity_Established);
if (DIC_OK != dic_init(dic::control::subscribeCB))
if (event->InternetConnectivityChange.IPv4 == kConnectivity_Established)
{
ChipLogError(AppServer, "dic_init failed");
if (DIC_OK != dic_init(dic::control::subscribeCB))
{
ChipLogError(AppServer, "dic_init failed");
}
}
#endif // DIC_ENABLE
#ifdef DISPLAY_ENABLED
SilabsLCD::Screen_e screen;
AppTask::GetLCD().GetScreen(screen);
// Update the LCD screen with SSID and connected state
VerifyOrReturn(screen == SilabsLCD::Screen_e::StatusScreen);
BaseApplication::UpdateLCDStatusScreen(false);
AppTask::GetLCD().SetScreen(screen);
if (screen == SilabsLCD::Screen_e::StatusScreen)
{
BaseApplication::UpdateLCDStatusScreen(false);
AppTask::GetLCD().SetScreen(screen);
}
#endif // DISPLAY_ENABLED
if ((event->ThreadConnectivityChange.Result == kConnectivity_Established) ||
(event->InternetConnectivityChange.IPv6 == kConnectivity_Established))
Expand Down
12 changes: 10 additions & 2 deletions scripts/tools/zap/update_cluster_revisions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@
import sys
from pathlib import Path

BASIC_INFORMATION_CLUSTER_ID = int("0x0039", 16)
CHIP_ROOT_DIR = os.path.realpath(
os.path.join(os.path.dirname(__file__), '../../..'))
EXCLUDE_FROM_UPDATE_DICTIONARY = {
BASIC_INFORMATION_CLUSTER_ID: ["lighting-app-data-mode-no-unique-id"]
}


def getTargets():
def getTargets(cluster_id: int):
ROOTS_TO_SEARCH = [
'./examples',
'./src/controller/data_model',
Expand All @@ -40,6 +44,10 @@ def getTargets():
for filepath in Path(root).rglob('*.zap'):
targets.append(filepath)

if cluster_id in EXCLUDE_FROM_UPDATE_DICTIONARY:
for target_to_exclude in EXCLUDE_FROM_UPDATE_DICTIONARY[cluster_id]:
targets = [target for target in targets if target_to_exclude not in target.parts]

return targets


Expand Down Expand Up @@ -130,7 +138,7 @@ def main():

os.chdir(CHIP_ROOT_DIR)

targets = getTargets()
targets = getTargets(args.cluster_id)

if args.dry_run:
for target in targets:
Expand Down
128 changes: 0 additions & 128 deletions src/app/zap-templates/zcl/data-model/all.xml

This file was deleted.

7 changes: 0 additions & 7 deletions third_party/silabs/SiWx917_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -336,16 +336,9 @@ template("siwx917_sdk") {
libs += [ "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM4_gcc.a" ]

cflags += [
"-Wno-maybe-uninitialized",
"-Wno-shadow",
"-Wno-empty-body",
"-Wno-cpp",
"-Wno-missing-braces",
"-Wno-sign-compare",
"-Wno-error",
"-Wno-unknown-warning-option",
"-Wno-unused-variable",
"-Wno-unused-function",
]

foreach(include_dir, _include_dirs) {
Expand Down

0 comments on commit 0bdcb6b

Please sign in to comment.