From a0cb2705ece755f1f0b7f20081dc3d46fd361b82 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 19 Jun 2023 15:36:56 +0000 Subject: [PATCH] examples/lock-app/esp32: synchronize buttons to matter (#27270) Appears to have been badly copy/pasted from other examples perhaps. Without this update call, pushing the button locally will update the LEDs and print the messages, but will not update the matter cluster state. Signed-off-by: Karl Palsson --- examples/lock-app/esp32/main/AppTask.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/lock-app/esp32/main/AppTask.cpp b/examples/lock-app/esp32/main/AppTask.cpp index 27aad563daa613..8b251a305e809c 100644 --- a/examples/lock-app/esp32/main/AppTask.cpp +++ b/examples/lock-app/esp32/main/AppTask.cpp @@ -422,6 +422,11 @@ void AppTask::ActionCompleted(BoltLockManager::Action_t aAction) sLockLED.Set(false); } + if (sAppTask.mSyncClusterToButtonAction) + { + chip::DeviceLayer::SystemLayer().ScheduleWork(UpdateClusterState, nullptr); + sAppTask.mSyncClusterToButtonAction = false; + } } void AppTask::PostLockActionRequest(int32_t aActor, BoltLockManager::Action_t aAction)