Skip to content

Commit

Permalink
Remove the conditionnal storage of EFS
Browse files Browse the repository at this point in the history
  • Loading branch information
lpbeliveau-silabs committed Nov 28, 2023
1 parent b962d8a commit 60146af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions src/app/clusters/scenes-server/SceneTableImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,8 @@ struct SceneTableData : public SceneTableEntry, PersistentData<kPersistentSceneB
}

ReturnErrorOnFailure(writer.Put(TLV::ContextTag(TagScene::kTransitionTimeMs), mStorageData.mSceneTransitionTimeMs));
ReturnErrorOnFailure(mStorageData.mExtensionFieldSets.Serialize(writer));

if (!mStorageData.mExtensionFieldSets.IsEmpty())
{
ReturnErrorOnFailure(mStorageData.mExtensionFieldSets.Serialize(writer));
}
return writer.EndContainer(container);
}

Expand Down Expand Up @@ -187,12 +184,7 @@ struct SceneTableData : public SceneTableEntry, PersistentData<kPersistentSceneB
mStorageData.SetName(nameSpan);
ReturnErrorOnFailure(reader.Get(mStorageData.mSceneTransitionTimeMs));

CHIP_ERROR err = reader.Next();
if (CHIP_END_OF_TLV != err)
{
VerifyOrReturnError(TLV::kTLVType_Array == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE);
ReturnErrorOnFailure(mStorageData.mExtensionFieldSets.Deserialize(reader));
}
ReturnErrorOnFailure(mStorageData.mExtensionFieldSets.Deserialize(reader));

return reader.ExitContainer(container);
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/CHIPConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,7 @@ extern const char CHIP_NON_PRODUCTION_MARKER[];
* }
*
* Including all the TLV fields, the following values can help estimate the needed size for a scenes given a number of clusters:
* Empty EFS Scene Max name size: 34 bytes
* Empty EFS Scene Max name size: 37 bytes
* Scene Max name size + OnOff : 55 bytes
* Scene Max name size + LevelControl : 64 bytes
* Scene Max name size + ColorControl : 130 bytes
Expand Down

0 comments on commit 60146af

Please sign in to comment.