Skip to content

Commit 07d0417

Browse files
mhazleychrismapptobiasgrafrestyled-commits
authored
Air Purifier Example App (#29861)
* Adding Air Purifier example framework and basic app, WIP * wip, started adding class structures * A messy yet stable version of the air-purifier, doesn't build as need to merge bug fix from upstream, WIP * Added TODO and tested following merge * The Air Quality Cluster API changed so updated constructor to take hard-coded features for now * Added common device callback interface and changed the MatterPostAttributeChangeCallback to call that * Changed the way we initialise the singleton Air Purifier Manager * Add air-purifier example for Ameba platform * Fixed wrong cluster revision in zap for concentraitons * Add air-purifier example for CC32xx platform * Add LastChangedTime and ReplaceableProductList To zap For HEPAFREMON And ACFREMON * Updates to zap file for missing attributes and commands * Adding PICS for the example * Add PostchangeCallback To CC32XX Example needed for writing the percentSetting to percentCurrent * Fix Zap File for RH - set Min/max/ MeasuredValue - enable tolerance attribute * Fix Zap File For Temp Measurement * Update ClusterRev For Thermostat From 5 To 6 * Update FeatureMap For Fan Control * Regenerate Matter File From Previous Zap Changes * Add Button Handler For CC32XX As a workaround save the KVS to NV when long pressing the right button. This can be used to save the state after e.g. a unpair. * Use Common filter-delegates.cpp For CC32XX Example * Switched thermostat pics to be AbsLimits on the setpoint * Updated the zapfile for thermostat * Adding thermostat manager * Changed all temperatures to be *100 and added callthrough from top level manager to thermostat when handling attribute changes * Added thermostat endpoint into init call * Changed name of attribute write handlers * Changed name of attribute write handlers * Add Thermostat-manager To CC32XX example * Add helper script for executing Air-Purifier tests * Remove duplicate line in air-purifier test runner script * Adding CHIP header comment to files * Removing Thermostat as the tests are broken for our use case * Removing TSTAT tests * Adding PICS folder in common with XML and simple PICS * Add Correct Device Type And Name * Removing Thermostat as the tests are broken for our use case * Add A Way To Reset The Matter Part Of The Device For CC32XX Air Purifier Example App this just deletes the kvs.cfg file on long pressing SW3 * Update README * Remove Commented Code * Update Copyright For CC32xx To 2023 * Update Copyright to 2023 For Ameba * Regenned after merging upstream * Added clearer Fan Mode support and some comments * Added comment re: TODO for thermostat endpoint * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * Restyled by shellharden * Removed missing reference in cc32xx readme * Adding README for linux and adding all README's to the docs toctree * Attempt 2 at setting toctree for new readmes * Fix whitespace in script * Restyled by shfmt * Fixed spelling mistake in Readme * Update include paths * Add Ameba air-purifier example readme file * Add words to wordlist * Removed PICS and script, changed cc32xx headers to use pragma once * Restyled by clang-format * Restyled by prettier-markdown * Removed TODO's from common code as they were not relevant * Revert "Add words to wordlist" This reverts commit 894a12953b70bfaff282d20e8cb64e1afb8eb2b5. * Replace indentations with fenced code blocks and minor tidy up within air purifier example readme file * Removed old debug comments from gn file * Added linux air-purifier-app to the helper script for building examples * Added air-purifier example for linux to CI * Restyled by prettier-markdown --------- Co-authored-by: Chris Mapp <chris.mapp@dyson.com> Co-authored-by: Graf Tobias <4622393+tobiasgraf@users.noreply.github.com> Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 954fff0 commit 07d0417

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+23329
-3
lines changed

.github/workflows/examples-linux-standalone.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,16 @@ jobs:
186186
"./scripts/build/build_examples.py \
187187
--target linux-x64-contact-sensor-no-ble-with-ui \
188188
build"
189+
- name: Build example Air Purifier
190+
run: |
191+
./scripts/run_in_build_env.sh \
192+
"./scripts/build/build_examples.py \
193+
--target linux-x64-air-purifier \
194+
build"
195+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
196+
linux debug air-purifier-app \
197+
out/linux-x64-air-purifier/chip-air-purifier-app \
198+
/tmp/bloat_reports/
189199
- name: Uploading Size Reports
190200
uses: ./.github/actions/upload-size-reports
191201
if: ${{ !env.ACT }}

.vscode/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@
115115
"condition_variable": "cpp",
116116
"numeric": "cpp",
117117
"random": "cpp",
118-
"thread": "cpp"
118+
"thread": "cpp",
119+
"variant": "cpp",
120+
"any": "cpp"
119121
},
120122
// Configure paths or glob patterns to exclude from file watching.
121123
"files.watcherExclude": {

docs/examples/index.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,20 @@ window-app/**/README
303303
resource-monitoring-app/**/README
304304
```
305305

306-
## Air Quality Sensor example
306+
## RVC example
307307

308308
```{toctree}
309309
:glob:
310310
:maxdepth: 1
311311
312312
rvc-app/README
313313
```
314+
315+
## Air Purifier Example
316+
317+
```{toctree}
318+
:glob:
319+
:maxdepth: 1
320+
321+
air-purifier-app/**/README
322+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2020 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import("//build_overrides/chip.gni")
16+
import("${chip_root}/src/app/chip_data_model.gni")
17+
18+
chip_data_model("air-purifier-common") {
19+
zap_file = "air-purifier-app.zap"
20+
21+
zap_pregenerated_dir =
22+
"${chip_root}/zzz_generated/air-purifier-app/zap-generated"
23+
is_server = true
24+
}

0 commit comments

Comments
 (0)