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 Oct 13, 2023
1 parent 3599928 commit 3247293
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 3247293

Please sign in to comment.