Skip to content

Commit

Permalink
Assume the AirQuality device endpoint is 1 in Chef
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinpan1 committed Sep 27, 2023
1 parent ffbf1cd commit f4eeb69
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/chef/common/chef-concentration-measurement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ static Instance gCarbonDioxideConcentrationMeasurementInstance =

void emberAfCarbonDioxideConcentrationMeasurementClusterInitCallback(EndpointId endpoint)
{
VerifyOrDie(1 == endpoint);
gCarbonDioxideConcentrationMeasurementInstance.Init();
}
#endif
Expand All @@ -56,6 +57,7 @@ static Instance gCarbonMonoxideConcentrationMeasurementInstance =

void emberAfCarbonMonoxideConcentrationMeasurementClusterInitCallback(EndpointId endpoint)
{
VerifyOrDie(1 == endpoint);
gCarbonMonoxideConcentrationMeasurementInstance.Init();
}
#endif
Expand All @@ -67,6 +69,7 @@ static Instance gNitrogenDioxideConcentrationMeasurementInstance =

void emberAfNitrogenDioxideConcentrationMeasurementClusterInitCallback(EndpointId endpoint)
{
VerifyOrDie(1 == endpoint);
gNitrogenDioxideConcentrationMeasurementInstance.Init();
}
#endif
Expand All @@ -78,6 +81,7 @@ static Instance gPm1ConcentrationMeasurementInstance =

void emberAfPm1ConcentrationMeasurementClusterInitCallback(EndpointId endpoint)
{
VerifyOrDie(1 == endpoint);
gPm1ConcentrationMeasurementInstance.Init();
}
#endif
Expand All @@ -89,6 +93,7 @@ static Instance gPm10ConcentrationMeasurementInstance =

void emberAfPm10ConcentrationMeasurementClusterInitCallback(EndpointId endpoint)
{
VerifyOrDie(1 == endpoint);
gPm10ConcentrationMeasurementInstance.Init();
}
#endif
Expand All @@ -100,6 +105,7 @@ static Instance gPm25ConcentrationMeasurementInstance =

void emberAfPm25ConcentrationMeasurementClusterInitCallback(EndpointId endpoint)
{
VerifyOrDie(1 == endpoint);
gPm25ConcentrationMeasurementInstance.Init();
}
#endif
Expand All @@ -111,6 +117,7 @@ static Instance gRadonConcentrationMeasurementInstance =

void emberAfRadonConcentrationMeasurementClusterInitCallback(EndpointId endpoint)
{
VerifyOrDie(1 == endpoint);
gRadonConcentrationMeasurementInstance.Init();
}
#endif
Expand All @@ -123,6 +130,7 @@ static Instance gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance =

void emberAfTotalVolatileOrganicCompoundsConcentrationMeasurementClusterInitCallback(EndpointId endpoint)
{
VerifyOrDie(1 == endpoint);
gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance.Init();
}
#endif
Expand All @@ -134,6 +142,7 @@ static Instance gOzoneConcentrationMeasurementInstance =

void emberAfOzoneConcentrationMeasurementClusterInitCallback(EndpointId endpoint)
{
VerifyOrDie(1 == endpoint);
gOzoneConcentrationMeasurementInstance.Init();
}
#endif
Expand All @@ -145,6 +154,7 @@ static Instance gFormaldehydeConcentrationMeasurementInstance =

void emberAfFormaldehydeConcentrationMeasurementClusterInitCallback(EndpointId endpoint)
{
VerifyOrDie(1 == endpoint);
gFormaldehydeConcentrationMeasurementInstance.Init();
}
#endif

0 comments on commit f4eeb69

Please sign in to comment.