Skip to content

Commit

Permalink
apply restyled changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarc committed May 27, 2023
1 parent 1c764dd commit 483b61a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/app/clusters/door-lock-server/door-lock-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3307,7 +3307,8 @@ bool DoorLockServer::HandleRemoteLockOperation(chip::app::CommandHandler * comma
const chip::app::ConcreteCommandPath & commandPath, LockOperationTypeEnum opType,
RemoteLockOpHandler opHandler, const Optional<ByteSpan> & pinCode)
{
VerifyOrDie(LockOperationTypeEnum::kLock == opType || LockOperationTypeEnum::kUnlock == opType || LockOperationTypeEnum::kUnlatch == opType);
VerifyOrDie(LockOperationTypeEnum::kLock == opType || LockOperationTypeEnum::kUnlock == opType ||
LockOperationTypeEnum::kUnlatch == opType);
VerifyOrDie(nullptr != opHandler);

EndpointId endpoint = commandPath.mEndpointId;
Expand Down Expand Up @@ -3442,14 +3443,14 @@ bool DoorLockServer::HandleRemoteLockOperation(chip::app::CommandHandler * comma
Nullable<chip::FabricIndex>(getFabricIndex(commandObj)), Nullable<chip::NodeId>(getNodeId(commandObj)),
credentials, success);

// SHALL generate a LockOperation event with LockOperationType set to Unlatch when the unlatched state is reached and a LockOperation
// event with LockOperationType set to Unlock when the lock successfully completes the unlock.
// But as the current implementation here is sending LockOperation events immediately we're sending both events immediately.
// SHALL generate a LockOperation event with LockOperationType set to Unlatch when the unlatched state is reached and a
// LockOperation event with LockOperationType set to Unlock when the lock successfully completes the unlock. But as the current
// implementation here is sending LockOperation events immediately we're sending both events immediately.
if (LockOperationTypeEnum::kUnlatch == opType && success)
{
SendLockOperationEvent(endpoint, LockOperationTypeEnum::kUnlock, OperationSourceEnum::kRemote, reason, pinUserIdx,
Nullable<chip::FabricIndex>(getFabricIndex(commandObj)), Nullable<chip::NodeId>(getNodeId(commandObj)),
credentials, success);
Nullable<chip::FabricIndex>(getFabricIndex(commandObj)),
Nullable<chip::NodeId>(getNodeId(commandObj)), credentials, success);
}

return success;
Expand Down

0 comments on commit 483b61a

Please sign in to comment.