Skip to content

Commit

Permalink
Merge branch 'master' into camera-webrtc-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarcosb authored Oct 3, 2024
2 parents 1823c64 + 2651245 commit 17724ec
Show file tree
Hide file tree
Showing 141 changed files with 27,166 additions and 4,823 deletions.
1 change: 1 addition & 0 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
"./scripts/build/build_examples.py \
--enable-flashbundle \
--target efr32-brd4187c-thermostat-openthread-mtd \
--target efr32-brd4187c-air-quality-sensor-app-openthread-mtd \
--target efr32-brd4187c-switch-shell-use-ot-coap-lib \
--target efr32-brd4187c-unit-test \
build \
Expand Down
4 changes: 0 additions & 4 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,6 @@ if (CONFIG_ENABLE_ESP_INSIGHTS_TRACE)
target_include_directories(${COMPONENT_LIB} INTERFACE "${CHIP_ROOT}/src/tracing/esp32_trace/include")
endif()

if (CONFIG_ENABLE_MATTER_EVENT_LIST)
chip_gn_arg_append ("enable_eventlist_attribute" "true")
endif()

set(args_gn_input "${CMAKE_CURRENT_BINARY_DIR}/args.gn.in")
file(GENERATE OUTPUT "${args_gn_input}" CONTENT "${chip_gn_args}")

Expand Down
9 changes: 0 additions & 9 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1298,15 +1298,6 @@ menu "CHIP Device Layer"

endmenu

menu "Enable Matter Event List"
config ENABLE_MATTER_EVENT_LIST
bool "Enable Matter support Event List attribute"
default n
help
Enable Matter support Event List attribute.

endmenu

menu "Enable BLE Extended Announcement"
config ENABLE_BLE_EXT_ANNOUNCEMENT
bool "Enable BLE Extended Announcement"
Expand Down
1 change: 0 additions & 1 deletion config/nxp/cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_CHIP_WI
matter_add_gn_arg_bool ("chip_enable_ethernet" CONFIG_CHIP_ETHERNET)
matter_add_gn_arg_bool ("chip_system_config_provide_statistics" CONFIG_CHIP_STATISTICS)
matter_add_gn_arg_bool ("chip_enable_icd_server" CONFIG_CHIP_ENABLE_ICD_SUPPORT)
matter_add_gn_arg_bool ("enable_eventlist_attribute" TRUE)
matter_add_gn_arg_bool ("chip_enable_ota_requestor" CONFIG_CHIP_OTA_REQUESTOR)

if(CONFIG_DEBUG)
Expand Down
38 changes: 22 additions & 16 deletions docs/testing/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,19 @@ Python tests located in src/python_testing
# for details about the block below.
#
# === BEGIN CI TEST ARGUMENTS ===
# test-runner-runs: run1
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
# test-runner-run/run1/factoryreset: True
# test-runner-run/run1/quiet: True
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
# test-runner-runs:
# run1:
# app: ${ALL_CLUSTERS_APP}
# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
# script-args: >
# --storage-path admin_storage.json
# --commissioning-method on-network
# --discriminator 1234
# --passcode 20202021
# --trace-to json:${TRACE_TEST_JSON}.json
# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
# factoryreset: true
# quiet: true
# === END CI TEST ARGUMENTS ===
class TC_MYTEST_1_1(MatterBaseTest):
Expand Down Expand Up @@ -669,10 +676,10 @@ for that run, e.g.:
# test-runner-runs:
# run1:
# app: ${TYPE_OF_APP}
# factoryreset: <true|false>
# quiet: <true|false>
# app-args: <app_arguments>
# script-args: <script_arguments>
# factoryreset: <true|false>
# quiet: <true|false>
# === END CI TEST ARGUMENTS ===
```

Expand Down Expand Up @@ -701,19 +708,18 @@ for that run, e.g.:
- Example:
`--discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json`

- `app-ready-pattern`: Regular expression pattern to match against the output
of the application to determine when the application is ready. If this
parameter is specified, the test runner will not run the test script until
the pattern is found.

- Example: `"Manual pairing code: \\[\\d+\\]"`

- `script-args`: Specifies the arguments to be passed to the test script.

- Example:
`--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto`

- `script-start-delay`: Specifies the number of seconds to wait before
starting the test script. This parameter can be used to allow the
application to initialize itself properly before the test script will try to
commission it (e.g. in case if the application needs to be commissioned to
some other controller first). By default, the delay is 0 seconds.

- Example: `10`

This structured format ensures that all necessary configurations are clearly
defined and easily understood, allowing for consistent and reliable test
execution.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ class AirQualitySensorManager
}
};

/**
* @return The current AirQuality value.
*/
AirQuality::AirQualityEnum GetAirQuality();

/**
* @brief Get an Air Quality Manager object - this class acts as a singleton device manager for the air quality device
* @param[in] aEndpointId Endpoint that the air quality is on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ void AirQualitySensorManager::Init()
mFormaldehydeConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow);
}

AirQualityEnum AirQualitySensorManager::GetAirQuality()
{
return mAirQualityInstance.GetAirQuality();
}

void AirQualitySensorManager::OnAirQualityChangeHandler(AirQualityEnum newValue)
{
mAirQualityInstance.UpdateAirQuality(newValue);
Expand Down
29 changes: 29 additions & 0 deletions examples/air-quality-sensor-app/silabs/.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")

# The location of the build configuration file.
buildconfig = "${build_root}/config/BUILDCONFIG.gn"

# CHIP uses angle bracket includes.
check_system_includes = true

default_args = {
target_cpu = "arm"
target_os = "freertos"
chip_openthread_ftd = true

import("//openthread.gni")
}
226 changes: 226 additions & 0 deletions examples/air-quality-sensor-app/silabs/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/efr32_sdk.gni")
import("//build_overrides/pigweed.gni")

import("${build_root}/config/defaults.gni")
import("${efr32_sdk_build_root}/silabs_executable.gni")

import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni")
import("${chip_root}/src/platform/device.gni")
import("${chip_root}/third_party/silabs/silabs_board.gni")

if (chip_enable_pw_rpc) {
import("//build_overrides/pigweed.gni")
import("$dir_pw_build/target_types.gni")
}

assert(current_os == "freertos")

silabs_project_dir = "${chip_root}/examples/air-quality-sensor-app/silabs"
examples_common_plat_dir = "${chip_root}/examples/platform/silabs"

if (wifi_soc) {
import("${chip_root}/third_party/silabs/SiWx917_sdk.gni")
examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917"
} else {
import("${efr32_sdk_build_root}/efr32_sdk.gni")
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
}

import("${examples_common_plat_dir}/args.gni")

declare_args() {
# Dump memory usage at link time.
chip_print_memory_usage = false

# Enable the air quality sensor
# Some boards do not have a air quality sensor
use_air_quality_sensor = false
}

if (wifi_soc) {
siwx917_sdk("sdk") {
sources = [
"${examples_common_plat_dir}/FreeRTOSConfig.h",
"${silabs_project_dir}/include/CHIPProjectConfig.h",
]

include_dirs = [
"${chip_root}/src/platform/silabs/SiWx917",
"${silabs_project_dir}/include",
"${examples_plat_dir}",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
]

defines = []
if (chip_enable_pw_rpc) {
defines += [
"HAL_VCOM_ENABLE=1",
"PW_RPC_ENABLED",
]
}
}
} else {
efr32_sdk("sdk") {
sources = [
"${examples_common_plat_dir}/FreeRTOSConfig.h",
"${silabs_project_dir}/include/CHIPProjectConfig.h",
]

include_dirs = [
"${chip_root}/src/platform/silabs/efr32",
"${silabs_project_dir}/include",
"${examples_plat_dir}",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
]

defines = []
if (chip_enable_pw_rpc) {
defines += [
"HAL_VCOM_ENABLE=1",
"PW_RPC_ENABLED",
]
}

#TODO: This is a placeholder for the actual implementation
if (use_air_quality_sensor) {
include_dirs +=
[ "${efr32_sdk_root}/examples/platform/silabs/sensors/AirQuality" ]

defines += [ "USE_AIR_QUALITY_SENSOR" ]
}
}
}

#ENDTODO

silabs_executable("air_quality_sensor_app") {
output_name = "matter-silabs-air-quality-sensor-example.out"
include_dirs = [
"include",
"${chip_root}/examples/air-quality-sensor-app/air-quality-sensor-common/include",
]
defines = []

sources = [
"${chip_root}/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp",
"${examples_common_plat_dir}/main.cpp",
"src/AppTask.cpp",
"src/SensorManager.cpp",
"src/ZclCallbacks.cpp",
]

#TODO: This is a placeholder for the actual implementation
if (use_air_quality_sensor) {
sources += [ "${efr32_sdk_root}/examples/platform/silabs/sensors/AirQuality/AirQualitySensor.cpp" ]
}

#ENDTODO

if (!disable_lcd) {
sources += [ "src/AirQualitySensorUI.cpp" ]
}

deps = [
":sdk",
"${chip_root}/src/platform/logging:default",
app_data_model,
]

if (wifi_soc) {
deps += [ "${examples_plat_dir}:siwx917-common" ]
} else {
deps += [ "${examples_plat_dir}:efr32-common" ]
}

if (chip_enable_pw_rpc) {
defines += [
"PW_RPC_ENABLED",
"PW_RPC_ATTRIBUTE_SERVICE=1",
"PW_RPC_BUTTON_SERVICE=1",
"PW_RPC_DESCRIPTOR_SERVICE=1",
"PW_RPC_DEVICE_SERVICE=1",
"PW_RPC_LIGHTING_SERVICE=1",
]

sources += [
"${chip_root}/examples/common/pigweed/RpcService.cpp",
"${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp",
"${examples_common_plat_dir}/PigweedLogger.cpp",
"${examples_common_plat_dir}/Rpc.cpp",
]

deps += [
"$dir_pw_hdlc:default_addresses",
"$dir_pw_hdlc:rpc_channel_output",
"$dir_pw_stream:sys_io_stream",
"${chip_root}/config/efr32/lib/pw_rpc:pw_rpc",
"${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc",
"${chip_root}/examples/common/pigweed:button_service.nanopb_rpc",
"${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc",
"${chip_root}/examples/common/pigweed:device_service.nanopb_rpc",
"${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc",
]

if (wifi_soc) {
deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ]
} else {
deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ]
}

deps += pw_build_LINK_DEPS

include_dirs += [
"${chip_root}/examples/common",
"${chip_root}/examples/common/pigweed/efr32",
]
}

ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld"

inputs = [ ldscript ]

ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ]

if (chip_print_memory_usage) {
ldflags += [
"-Wl,--print-memory-usage",
"-fstack-usage",
]
}

# WiFi Settings
if (chip_enable_wifi) {
ldflags += [
"-Wl,--defsym",
"-Wl,SILABS_WIFI=1",
]
}

output_dir = root_out_dir
}

group("silabs") {
deps = [ ":air_quality_sensor_app" ]
}

group("default") {
deps = [ ":silabs" ]
}
Loading

0 comments on commit 17724ec

Please sign in to comment.