Skip to content

Commit

Permalink
Merge branch 'master' into feature/add-chef-laundry-washer
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored Aug 21, 2023
2 parents dbb53f5 + 3e60d8c commit 01cd246
Show file tree
Hide file tree
Showing 71 changed files with 14,030 additions and 950 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-efr32:1
image: ghcr.io/project-chip/chip-build-efr32:8
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ void AirQualitySensorAttrUpdateHandler::HandleCommand(intptr_t context)
auto * self = reinterpret_cast<AirQualitySensorAttrUpdateHandler *>(context);
std::string clusterName = self->mJsonValue["Name"].asString();

VerifyOrReturn(!self->mJsonValue.empty(), ChipLogError(NotSpecified, "Invalid JSON event command received"));
VerifyOrReturn(!self->mJsonValue.empty(), {
ChipLogError(NotSpecified, "Invalid JSON event command received");
Platform::Delete(self);
});

if (clusterName == "AirQuality")
{
Expand Down
10 changes: 5 additions & 5 deletions examples/air-quality-sensor-app/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,30 +116,30 @@ To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini**
## Trigger event using air-quality-sensor-app event named pipe

You can send a command to air-quality-sensor-app to trigger specific event via
air-quality-sensor-app event named pipe /tmp/chip_air_quality_fifo-<PID>.
air-quality-sensor-app event named pipe /tmp/chip_air_quality_fifo\*<PID>.

### Trigger air quality change event

Generate event `AirQuality`, to change the air quality value.

```
$ echo '{"Name":"AirQuality","NewValue":3}' > /tmp/chip_air_quality_fifo-<PID>
$ echo '{"Name":"AirQuality","NewValue":3}' > /tmp/chip_air_quality_fifo_<PID>
```

### Trigger Temperature change event

Generate event `TemperatureMeasurement`, to change the temperate value.

```
$ echo '{"Name":"TemperatureMeasurement","NewValue":18}' > /tmp/chip_air_quality_fifo-<PID>
$ echo '{"Name":"TemperatureMeasurement","NewValue":18}' > /tmp/chip_air_quality_fifo_<PID>
```

### Trigger Humidity change event

Generate event `RelativeHumidityMeasurement`, to change the temperate value.

```
$ echo '{"Name":"RelativeHumidityMeasurement","NewValue":60}' > /tmp/chip_air_quality_fifo-<PID>
$ echo '{"Name":"RelativeHumidityMeasurement","NewValue":60}' > /tmp/chip_air_quality_fifo_<PID>
```

### Trigger concentration change event
Expand All @@ -150,5 +150,5 @@ clusters.
Generate event `CarbonDioxideConcentrationMeasurement`, to change the CO2 value.

```
$ echo '{"Name":"CarbonDioxideConcentrationMeasurement","NewValue":400}' > /tmp/chip_air_quality_fifo-<PID>
$ echo '{"Name":"CarbonDioxideConcentrationMeasurement","NewValue":400}' > /tmp/chip_air_quality_fifo_<PID>
```
Loading

0 comments on commit 01cd246

Please sign in to comment.