Skip to content

Commit

Permalink
Pull request project-chip#1490: Add missing boards and sample app in CI
Browse files Browse the repository at this point in the history
Merge in WMN_TOOLS/matter from ci_add_sample_app_and_boards to silabs

Squashed commit of the following:

commit 9ca684e6801158140b6e3f9a1b532d8d86dae354
Author: Junior Martinez <[email protected]>
Date:   Fri Jan 12 15:43:16 2024 -0500

    Fix dishwasher operation-state-degate-impl due to change to the CSA delegate

commit a354504499ed4e1b9b4f49d82540ddee4f5c98e0
Author: jepenven-silabs <[email protected]>
Date:   Fri Jan 12 15:05:53 2024 -0500

    fis path diswasher

commit 9b4555642323e405e0fa65465b2cf8d38c507b7f
Author: jepenven-silabs <[email protected]>
Date:   Fri Jan 12 12:01:03 2024 -0500

    Add missing boards and sample app in CI
  • Loading branch information
jepenven-silabs authored and jmartinez-silabs committed Jan 24, 2024
1 parent 43aa0c0 commit 40ca321
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@ class OperationalStateDelegate : public Delegate

/**
* Get the list of supported operational phases.
* Fills in the provided GenericOperationalPhase with the phase at index `index` if there is one,
* Fills in the provided MutableCharSpan with the phase at index `index` if there is one,
* or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of phases.
*
* If CHIP_ERROR_NOT_FOUND is returned for index 0, that indicates that the PhaseList attribute is null
* (there are no phases defined at all).
*
* @param index The index of the phase, with 0 representing the first phase.
* @param operationalPhase The GenericOperationalPhase is filled.
* @param operationalPhase The MutableCharSpan is filled.
*/
CHIP_ERROR GetOperationalPhaseAtIndex(size_t index, GenericOperationalPhase & operationalPhase) override;
CHIP_ERROR GetOperationalPhaseAtIndex(size_t index, MutableCharSpan & operationalPhase) override;

// command callback
/**
Expand Down Expand Up @@ -103,13 +107,7 @@ class OperationalStateDelegate : public Delegate
};

app::DataModel::List<const GenericOperationalState> mOperationalStateList = Span<const GenericOperationalState>(rvcOpStateList);

const GenericOperationalPhase opPhaseList[1] = {
// Phase List is null
GenericOperationalPhase(DataModel::Nullable<CharSpan>()),
};

Span<const GenericOperationalPhase> mOperationalPhaseList = Span<const GenericOperationalPhase>(opPhaseList);
const Span<const CharSpan> mOperationalPhaseList;
};

OperationalState::Instance* GetInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@ CHIP_ERROR OperationalStateDelegate::GetOperationalStateAtIndex(size_t index, Ge
return CHIP_NO_ERROR;
}

CHIP_ERROR OperationalStateDelegate::GetOperationalPhaseAtIndex(size_t index, GenericOperationalPhase & operationalPhase)
CHIP_ERROR OperationalStateDelegate::GetOperationalPhaseAtIndex(size_t index, MutableCharSpan & operationalPhase)
{
if (index > mOperationalPhaseList.size() - 1)
if (index >= mOperationalPhaseList.size())
{
return CHIP_ERROR_NOT_FOUND;
}
operationalPhase = mOperationalPhaseList[index];
return CHIP_NO_ERROR;
return CopyCharSpanToMutableCharSpan(mOperationalPhaseList[index], operationalPhase);
}

void OperationalStateDelegate::HandlePauseStateCallback(GenericOperationalError & err)
Expand Down

0 comments on commit 40ca321

Please sign in to comment.