Skip to content

Commit c8371e1

Browse files
[SL-UP] No Pin Unlatch fix (#87)
1 parent 6962345 commit c8371e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/lock-app/silabs/src/LockManager.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,9 @@ void LockManager::UnlockAfterUnlatch()
264264
bool succes = false;
265265
if (mUnlatchContext.mEndpointId != kInvalidEndpointId)
266266
{
267+
Optional<chip::ByteSpan> pin = (mUnlatchContext.mPinLength) ? MakeOptional(chip::ByteSpan(mUnlatchContext.mPinBuffer, mUnlatchContext.mPinLength)): Optional<chip::ByteSpan>::Missing();
267268
succes = setLockState(mUnlatchContext.mEndpointId, mUnlatchContext.mFabricIdx, mUnlatchContext.mNodeId,
268-
DlLockState::kUnlocked, MakeOptional(chip::ByteSpan(mUnlatchContext.mPinBuffer, mUnlatchContext.mPinLength)), mUnlatchContext.mErr);
269+
DlLockState::kUnlocked, pin, mUnlatchContext.mErr);
269270
}
270271

271272
if (!succes)

0 commit comments

Comments
 (0)