Skip to content

Commit

Permalink
Bluetooth: mesh: Fix scene recall for Light Ctrl server
Browse files Browse the repository at this point in the history
The Light Lightness Control Server now resumes the Lightness Controller
automatically after a scene recall, fixing the known issue NCSDK-30033.

Signed-off-by: Stine Akredalen <[email protected]>
  • Loading branch information
akredalen committed Jan 6, 2025
1 parent 84ec4da commit 56f1dbc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,12 @@ Binary libraries
Bluetooth libraries and services
--------------------------------

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

* Updated:

* 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

0 comments on commit 56f1dbc

Please sign in to comment.