Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync csa branch with main #241

Merged
merged 3 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIPTests/MTRSetupPayloadTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ - (void)testDescriptionShowsUnknownDiscoveryMethods
XCTAssertNotEqualObjects(a.description, b.description);
}

- (uint32)generateRepeatedDigitPasscode:(uint8_t)digit
- (uint32_t)generateRepeatedDigitPasscode:(uint8_t)digit
{
// "digit" is expected to be a single digit. Generates a number that has
// that digit repeated 8 times.
Expand Down
9 changes: 4 additions & 5 deletions src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ extern "C" {
#define RPS_HEADER 1
#define RPS_DATA 2

#define SL_STATUS_FW_UPDATE_DONE SL_STATUS_SI91X_NO_AP_FOUND
uint8_t flag = RPS_HEADER;
static chip::OTAImageProcessorImpl gImageProcessor;

Expand Down Expand Up @@ -186,13 +185,13 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context)

if (status != SL_STATUS_OK)
{
if (status == SL_STATUS_FW_UPDATE_DONE)
if (status == SL_STATUS_SI91X_FW_UPDATE_DONE)
{
mReset = true;
}
else
{
ChipLogError(SoftwareUpdate, "ERROR: In HandleFinalize for last chunk sl_si91x_fwup_load() error %ld", status);
ChipLogError(SoftwareUpdate, "ERROR: In HandleFinalize for last chunk sl_si91x_fwup_load() error 0x%lx", status);
imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED);
return;
}
Expand Down Expand Up @@ -315,13 +314,13 @@ void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context)
{
// If the last chunk of last block-writeBufOffset length is exactly kAlignmentBytes(64) bytes then mReset value
// should be set to true in HandleProcessBlock
if (status == SL_STATUS_FW_UPDATE_DONE)
if (status == SL_STATUS_SI91X_FW_UPDATE_DONE)
{
mReset = true;
}
else
{
ChipLogError(SoftwareUpdate, "ERROR: In HandleProcessBlock sl_si91x_fwup_load() error %ld", status);
ChipLogError(SoftwareUpdate, "ERROR: In HandleProcessBlock sl_si91x_fwup_load() error 0x%lx", status);
imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED);
return;
}
Expand Down
8 changes: 7 additions & 1 deletion src/python_testing/TestSpecParsingSupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ def get_access_enum_from_string(access_str: str) -> Clusters.AccessControl.Enums
' </revisionHistory>'
' <clusterIds>'
' <clusterId id="0xFFFE" name="Test Alias1"/>'
' <clusterId id="0xFFFD" name="Test Alias2"/>'
' <clusterId id="0xFFFD" name="Test Alias2">'
' <provisionalConform/>'
' </clusterId>'
' </clusterIds>'
' <classification hierarchy="base" role="application" picsCode="BASE" scope="Endpoint"/>'
' <commands>'
Expand Down Expand Up @@ -396,6 +398,10 @@ def test_aliased_clusters(self):
asserts.assert_true((0xFFFE, 'Test Alias1') in ids, "Unable to find Test Alias1 cluster in parsed clusters")
asserts.assert_true((0xFFFD, 'Test Alias2') in ids, "Unable to find Test Alias2 cluster in parsed clusters")

# Test Alias2 is marked as provisional, and TestAlias1 is not
asserts.assert_false(clusters[0xFFFE].is_provisional, "Test Alias1 is marked as provisional and should not be")
asserts.assert_true(clusters[0xFFFD].is_provisional, "Test Alias2 is not marked as provisional and should be")

def test_known_aliased_clusters(self):
known_aliased_clusters = set([(0x040C, 'Carbon Monoxide Concentration Measurement', 'CMOCONC'),
(0x040D, 'Carbon Dioxide Concentration Measurement', 'CDOCONC'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,10 @@ def __init__(self, cluster: ElementTree.Element, cluster_id: Optional[uint], nam
except (KeyError, StopIteration):
self._derived = None

for id in cluster.iter('clusterIds'):
if list(id.iter('provisionalConform')):
self._is_provisional = True
for ids in cluster.iter('clusterIds'):
for id in ids.iter('clusterId'):
if id.attrib['name'] == name and list(id.iter('provisionalConform')):
self._is_provisional = True

self._pics: Optional[str] = None
try:
Expand Down
Loading