Skip to content

Commit

Permalink
[Ameba] Fix Read Product Appearance (#28860)
Browse files Browse the repository at this point in the history
* Fix Read Product Appearance

* Updated product finish to other and product color to black

* ran restyle-diff.sh
  • Loading branch information
pankore authored and pull[bot] committed Feb 26, 2024
1 parent 328fac5 commit a558dc8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/platform/Ameba/FactoryDataProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <platform/internal/GenericConfigurationManagerImpl.ipp>

using namespace ::chip::DeviceLayer::Internal;
using namespace chip::app::Clusters::BasicInformation;

namespace chip {
namespace DeviceLayer {
Expand Down Expand Up @@ -664,5 +665,19 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & un
return err;
}

CHIP_ERROR FactoryDataProvider::GetProductFinish(ProductFinishEnum * finish)
{
CHIP_ERROR err = CHIP_NO_ERROR;
*finish = ProductFinishEnum::kOther;
return err;
}

CHIP_ERROR FactoryDataProvider::GetProductPrimaryColor(ColorEnum * primaryColor)
{
CHIP_ERROR err = CHIP_NO_ERROR;
*primaryColor = ColorEnum::kBlack;
return err;
}

} // namespace DeviceLayer
} // namespace chip
2 changes: 2 additions & 0 deletions src/platform/Ameba/FactoryDataProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class FactoryDataProvider : public chip::Credentials::DeviceAttestationCredentia
CHIP_ERROR GetHardwareVersion(uint16_t & hardwareVersion) override;
CHIP_ERROR GetHardwareVersionString(char * buf, size_t bufSize) override;
CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override;
CHIP_ERROR GetProductFinish(app::Clusters::BasicInformation::ProductFinishEnum * finish) override;
CHIP_ERROR GetProductPrimaryColor(app::Clusters::BasicInformation::ColorEnum * primaryColor) override;

bool kReadFromFlash = false;

Expand Down

0 comments on commit a558dc8

Please sign in to comment.