Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: mesh: Fix scene recall for Light Ctrl server #19752

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,9 @@ Binary libraries
Bluetooth libraries and services
--------------------------------

|no_changes_yet_note|
* :ref:`bt_mesh` library:

* Fixed an issue in the :ref:`bt_mesh_light_ctrl_srv_readme` model to automatically resume the Lightness Controller after recalling a scene (``NCSDK-30033`` known issue).

Common Application Framework
----------------------------
Expand Down
4 changes: 3 additions & 1 deletion subsys/bluetooth/mesh/light_ctrl_srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1541,8 +1541,10 @@ static void scene_recall(const struct bt_mesh_model *model, const uint8_t data[]
.transition = transition,
};

bool restart = is_enabled(srv);

ctrl_disable(srv);
if (atomic_test_bit(&srv->flags, FLAG_RESUME_TIMER)) {
if (restart || atomic_test_bit(&srv->flags, FLAG_RESUME_TIMER)) {
schedule_resume_timer(srv);
}
lightness_srv_change_lvl(srv->lightness, NULL, &set, &status, true);
Expand Down
Loading