Skip to content

Commit

Permalink
Added Feature Map to AirQuality Read Handler (project-chip#29105)
Browse files Browse the repository at this point in the history
* Added Feature Map to read handler

* Set the air quality feature map to zero in zapfile so that we are sure the value is being encoded by the read handler
  • Loading branch information
mhazley authored and HunsupJung committed Oct 23, 2023
1 parent 7ca9a8a commit 908f638
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6826,7 +6826,7 @@ endpoint 1 {
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 15;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10495,7 +10495,7 @@
]
},
{
"id": 4,
"id": 2,
"name": "MA-onofflight",
"deviceTypeRef": {
"code": 256,
Expand Down Expand Up @@ -16926,7 +16926,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "15",
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -34866,7 +34866,7 @@
]
},
{
"id": 2,
"id": 4,
"name": "Anonymous Endpoint Type",
"deviceTypeRef": {
"code": 61442,
Expand Down Expand Up @@ -35394,4 +35394,4 @@
}
],
"log": []
}
}
3 changes: 3 additions & 0 deletions src/app/clusters/air-quality-server/air-quality-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu
case Attributes::AirQuality::Id:
ReturnErrorOnFailure(aEncoder.Encode(mAirQuality));
break;
case Attributes::FeatureMap::Id:
ReturnErrorOnFailure(aEncoder.Encode(mFeature.Raw()));
break;
}
return CHIP_NO_ERROR;
}
Expand Down

0 comments on commit 908f638

Please sign in to comment.