Skip to content

Commit

Permalink
[ESP32] Fixed lock app crash (#25895)
Browse files Browse the repository at this point in the history
* [ESP32] Fixed lock app crash

* Used RAII lock
  • Loading branch information
jadhavrohit924 authored and pull[bot] committed Jan 19, 2024
1 parent cc9993e commit 92db1d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/lock-app/esp32/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)];

using namespace ::chip::DeviceLayer;
using namespace ::chip::System;
// using namespace ESP32DoorLock::LockInitParams;

AppTask AppTask::sAppTask;

Expand All @@ -86,6 +85,8 @@ CHIP_ERROR AppTask::Init()
(void *) this, // init timer id = app task obj context
TimerEventHandler // timer callback handler
);

chip::DeviceLayer::StackLock lock;
CHIP_ERROR err = BoltLockMgr().InitLockState();

BoltLockMgr().SetCallbacks(ActionInitiated, ActionCompleted);
Expand Down

0 comments on commit 92db1d4

Please sign in to comment.