Skip to content

Commit aec68f0

Browse files
adigiecarlescufi
authored andcommitted
samples: matter: lock: Add Kconfig for passing credentials to SetLockState
Replace `#if 0` with Kconfig. Signed-off-by: Adrian Gielniewski <[email protected]> (cherry picked from commit 8d871a8)
1 parent c7a94e3 commit aec68f0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

samples/matter/lock/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ config LOCK_MAX_CREDENTIAL_LENGTH
2222
int "Maximum length of the single credential supported by the lock"
2323
default 10
2424

25+
config LOCK_PASS_CREDENTIALS_TO_SET_LOCK_STATE
26+
bool "Pass used credentials when setting the lock state"
27+
help
28+
This option should stay disabled until TC-DRLK-2.3 is fixed.
29+
Related issue: https://github.com/project-chip/connectedhomeip/issues/38222
30+
2531
config LOCK_SCHEDULES
2632
bool "Support for WeekDay, YearDay and Holiday schedules in lock"
2733
help

samples/matter/lock/src/app_task.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,18 +216,14 @@ void AppTask::UpdateClusterStateHandler(const BoltLockManager::StateData &stateD
216216

217217
Nullable<uint16_t> userId;
218218
Nullable<List<const LockOpCredentials>> credentials;
219-
/* Don't pass credentials to SetLockState until TC-DRLK-2.3 is fixed.
220-
https://github.com/project-chip/connectedhomeip/issues/38222 */
221-
#if 0
219+
#ifdef CONFIG_LOCK_PASS_CREDENTIALS_TO_SET_LOCK_STATE
222220
List<const LockOpCredentials> credentialList;
223221
#endif
224222

225223
if (!stateData.mValidatePINResult.IsNull()) {
226224
userId = { stateData.mValidatePINResult.Value().mUserId };
227225

228-
/* Don't pass credentials to SetLockState until TC-DRLK-2.3 is fixed.
229-
https://github.com/project-chip/connectedhomeip/issues/38222 */
230-
#if 0
226+
#ifdef CONFIG_LOCK_PASS_CREDENTIALS_TO_SET_LOCK_STATE
231227
/* `DoorLockServer::SetLockState` exptects list of `LockOpCredentials`,
232228
however in case of PIN validation it makes no sense to have more than one
233229
credential corresponding to validation result. For simplicity we wrap single

0 commit comments

Comments
 (0)